public function render()
 {
     //Get the parameters
     $params = $this->getObject('application')->getParams();
     //Get the contact
     $article = $this->getModel()->getData();
     //Set the breadcrumbs
     $pathway = $this->getObject('application')->getPathway();
     $page = $this->getObject('application.pages')->getActive();
     if ($page->getLink()->query['view'] == 'categories') {
         $category = $this->getCategory();
         $pathway->addItem($category->title, $this->getTemplate()->getHelper('route')->category(array('row' => $category)));
         $pathway->addItem($article->title, '');
     }
     if ($page->getLink()->query['view'] == 'articles') {
         $pathway->addItem($article->title, '');
     }
     if ($article->id && $article->isAttachable()) {
         $this->attachments($article->getAttachments());
     }
     if ($article->id && $article->isTaggable()) {
         $this->tags($article->getTags());
     }
     $this->params = $params;
     return parent::render();
 }
 public function render()
 {
     //Get the parameters
     $params = $this->getObject('application')->getParams();
     //Get the category
     $category = $this->getCategory();
     //Set the pathway
     $page = $this->getObject('application.pages')->getActive();
     if ($page->getLink()->query['view'] == 'categories') {
         $this->getObject('application')->getPathway()->addItem($category->title, '');
     }
     $this->params = $params;
     $this->category = $category;
     return parent::render();
 }
Exemple #3
0
 public function render()
 {
     //Get the parameters
     $params = $this->getObject('application')->getParams();
     //Get the category
     $category = $this->getCategory();
     //Get the parameters of the active menu item
     if ($page = $this->getObject('application.pages')->getActive()) {
         $menu_params = new JParameter($page->params);
         if (!$menu_params->get('page_title')) {
             $params->set('page_title', $category->title);
         }
     } else {
         $params->set('page_title', $category->title);
     }
     //Set the pathway
     if ($page->getLink()->query['view'] == 'categories') {
         $this->getObject('application')->getPathway()->addItem($category->title, '');
     }
     $this->params = $params;
     $this->category = $category;
     return parent::render();
 }