/** * Prepares the document * * @return void */ protected function prepareDocument() { parent::prepareDocument(); $app = JFactory::getApplication(); $menus = $app->getMenu(); $pathway = $app->getPathway(); $title = null; // Because the application sets a default page title, // we need to get it from the menu item itself $menu = $menus->getActive(); if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', JText::_('COM_HTRAININGLOGS_DEFAULT_PAGE_TITLE')); } $id = (int) @$menu->query['id']; if ($menu && ($menu->query['option'] != 'com_htraininglogs' || $id != $this->category->id)) { $this->params->set('page_subheading', $this->category->title); $path = array(array('title' => $this->category->title, 'link' => '')); $category = $this->category->getParent(); while (($menu->query['option'] != 'com_htraininglogs' || $id != $category->id) && $category->id > 1) { $path[] = array('title' => $category->title, 'link' => HtraininglogsHelperRoute::getCategoryRoute($category->id)); $category = $category->getParent(); } $path = array_reverse($path); foreach ($path as $item) { $pathway->addItem($item['title'], $item['link']); } } parent::addFeed(); }
?> <?php if ($this->params->get('show_empty_categories') || $child->numitems || count($child->getChildren())) { if (!isset($this->children[$this->category->id][$id + 1])) { $class = ' class="last"'; } ?> <li<?php echo $class; ?> > <?php $class = ''; ?> <span class="item-title"><a href="<?php echo JRoute::_(HtraininglogsHelperRoute::getCategoryRoute($child->id)); ?> "> <?php echo $this->escape($child->title); ?> </a> </span> <?php if ($this->params->get('show_subcat_desc') == 1) { ?> <?php if ($child->description) { ?> <div class="category-desc">