Exemplo n.º 1
0
 /**
  * (non-PHPdoc)
  * @see Lampcms\Controllers.Viewquestions::makeQlistHeader()
  */
 protected function makeQlistHeader()
 {
     $Renderer = new \Lampcms\Category\Renderer($this->Registry);
     $breadCrumb = $Renderer->getBreadCrumb($this->aCategory['id'], false);
     $subs = '';
     $subCategories = $Renderer->getSubCategoriesOf(53);
     //$this->aCategory['id']
     if (!empty($subCategories)) {
         $subs = \tplSubcategories::parse(array($this->_('Sub categories'), \tplSubcategory::loop($subCategories)), false);
     }
     $this->aPageVars['qheader'] = $breadCrumb . $subs;
     return $this;
 }
 /**
  * Get breakcrumb links
  * 
  * @param int $id
  * @return string html of breadcrumb
  */
 protected function getBreadcrumb($id)
 {
     if ('' == $this->Registry->Ini->CATEGORIES) {
         return '';
     }
     $Renderer = new \Lampcms\Category\Renderer($this->Registry);
     return $Renderer->getBreadCrumb($id);
 }
Exemplo n.º 3
0
 /**
  * Set the variables for the 'body' or main template
  * Using the tplEditcats template
  *
  * @return \Lampcms\Controllers\Editcategory
  */
 protected function setBody()
 {
     $ListRenderer = new \Lampcms\Category\Renderer($this->Registry);
     $list = $ListRenderer->getSortableList();
     $vars = array('cat_title' => '@@Category Title@@', 'manage_category' => '@@Add or Edit Category@@', 'cat_title_desc' => '@@Enter title of the category@@', 'cat_slug' => '@@Category Slug@@', 'catslug_desc' => '@@Seo-friendly URL part of category@@', 'cat_desc' => '@@Category Description@@', 'catdesc_desc' => '@@A short description of this category. HTML is allowed. If entering html, make sure html is valid!@@', 'catonly' => '@@Category-only@@', 'catonly_desc' => '@@Category-only can contain only sub-categories and cannot contain posts@@', 'submit' => '@@Add New Category@@', 'reset' => '@@Reset@@', 'categories' => '@@Sort Categories@@', 'cat_list' => $list, 'parent_select' => '', 'active' => '@@Active@@', 'active_desc' => '', 'active_checked' => 'checked', 'save' => '@@Save Sort Order@@');
     $this->aPageVars['body'] = \tplEditcats::parse($vars);
     return $this;
 }