"> <td> <a href="javascript:void(0)" onclick="if (window.parent) window.parent.<?php echo $this->escape($function); ?> ('<?php echo $item->file_id; ?> ', '<?php echo $this->escape(addslashes($item->file_title)); ?> ', '<?php echo $this->escape($item->cat_id); ?> ', null, '<?php echo $this->escape(JdownloadsHelperRoute::getDownloadRoute($item->file_id, $item->cat_id, $item->language)); ?> ', '<?php echo $this->escape($lang); ?> ', null);"> <?php echo $this->escape($item->file_title); ?> </a> </td> <td class="center"><?php echo $this->escape($item->release); ?> </td>
/** * Prepares the document */ protected function _prepareDocument() { global $jlistConfig; $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_JDOWNLOADS_DOWNLOADS')); } if (count($this->items) > 1) { $title = JText::_('COM_JDOWNLOADS_FRONTEND_HEADER_SUMMARY_PAGE_TITLE'); } else { $title = $this->params->get('page_title', ''); $title .= ' - ' . JText::_('COM_JDOWNLOADS_FRONTEND_HEADER_SUMMARY_PAGE_TITLE'); } if (isset($menu->query['catid'])) { $id = (int) @$menu->query['catid']; // the Download category has an own menu item } else { $id = 0; // the Download category has not an own menu item } if ($menu) { // we have a single download process - so we can add the link to this download in the breadcrumbs if ($this->items[0]->file_title && count($this->items) == 1) { $title = $this->items[0]->file_title; $title .= ' - ' . JText::_('COM_JDOWNLOADS_FRONTEND_HEADER_SUMMARY_PAGE_TITLE'); } $path = array(array('title' => JText::_('COM_JDOWNLOADS_FRONTEND_HEADER_SUMMARY_PAGE_TITLE'), 'link' => '')); if (count($this->items) == 1) { $path[] = array('title' => $this->items[0]->file_title, 'link' => JdownloadsHelperRoute::getDownloadRoute($this->items[0]->slug, $this->items[0]->cat_id, $this->items[0]->language)); } $category = JDCategories::getInstance('Download')->get($this->items[0]->cat_id); while ($category && ($menu->query['option'] != 'com_jdownloads' || $id == 0 && $id != $category->id) && $category->id != 'root') { $path[] = array('title' => $category->title, 'link' => JdownloadsHelperRoute::getCategoryRoute($category->id, true)); $category = $category->getParent(); } $path = array_reverse($path); foreach ($path as $item) { $pathway->addItem($item['title'], $item['link']); } } // Check for empty title and add site name if param is set if (empty($title)) { $title = $app->getCfg('sitename'); } elseif ($app->getCfg('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title); } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename')); } if (empty($title)) { $title = JText::_('COM_JDOWNLOADS_FRONTEND_HEADER_SUMMARY_PAGE_TITLE'); } $this->document->setTitle($title); $this->document->setDescription($this->params->get('menu-meta_description')); // use at first settings from download - alternate from jD configuration if ($jlistConfig['robots']) { // use settings from jD-config $this->document->setMetadata('robots', $jlistConfig['robots']); } else { // is not defined in item or jd-config - so we use the global config setting $this->document->setMetadata('robots', $app->getCfg('robots')); } }