Source for file categories.php
Documentation is available at categories.php
* @package Joomla.Libraries
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* Categories view base class.
* @package Joomla.Libraries
* Language key for default page heading
* Execute and display a template script.
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
* @return mixed A string if successful, otherwise a Error object.
public function display($tpl =
null)
$state =
$this->get('State');
$items =
$this->get('Items');
$parent =
$this->get('Parent');
if (count($errors =
$this->get('Errors')))
$app->enqueueMessage($errors, 'error');
$app->enqueueMessage(JText::_('JGLOBAL_CATEGORY_NOT_FOUND'), 'error');
$app->enqueueMessage(JText::_('JGLOBAL_CATEGORY_NOT_FOUND'), 'error');
$params =
&$state->params;
$items =
array($parent->id =>
$items);
// Escape strings for HTML output
$this->maxLevelcat =
$params->get('maxLevelcat', -
1);
$this->params =
&$params;
$this->parent =
&$parent;
$menus =
$app->getMenu();
// Because the application sets a default page title, we need to get it from the menu item itself
$menu =
$menus->getActive();
$this->params->def('page_heading', $this->params->get('page_title', $menu->title));
$title =
$this->params->get('page_title', '');
$title =
$app->get('sitename');
elseif ($app->get('sitename_pagetitles', 0) ==
1)
$title =
JText::sprintf('JPAGETITLE', $app->get('sitename'), $title);
elseif ($app->get('sitename_pagetitles', 0) ==
2)
$title =
JText::sprintf('JPAGETITLE', $title, $app->get('sitename'));
$this->document->setTitle($title);
if ($this->params->get('menu-meta_description'))
$this->document->setDescription($this->params->get('menu-meta_description'));
if ($this->params->get('menu-meta_keywords'))
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
if ($this->params->get('robots'))
$this->document->setMetadata('robots', $this->params->get('robots'));
Documentation generated on Tue, 19 Nov 2013 14:55:15 +0100 by phpDocumentor 1.4.3