Source for file view.html.php
Documentation is available at view.html.php
* @subpackage com_content
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* HTML Article View class for the Content component
* @subpackage com_content
public function display($tpl =
null)
if (empty($this->item->id))
$authorised =
$user->authorise('core.create', 'com_content') ||
(count($user->getAuthorisedCategories('com_content', 'core.create')));
$authorised =
$this->item->params->get('access-edit');
if ($authorised !==
true)
if (!empty($this->item->id))
$this->item->tags->getItemTags('com_content.article.', $this->item->id);
if (!empty($this->item) && isset
($this->item->id))
$tmp->images =
$this->item->images;
$tmp->urls =
$this->item->urls;
if (count($errors =
$this->get('Errors')))
// Create a shortcut to the parameters.
$params =
&$this->state->params;
//Escape strings for HTML output
if ($params->get('enable_category') ==
1)
$this->form->setFieldAttribute('catid', 'default', $params->get('catid', 1));
$this->form->setFieldAttribute('catid', 'readonly', 'true');
$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));
$this->params->def('page_heading', JText::_('COM_CONTENT_FORM_EDIT_ARTICLE'));
$title =
$this->params->def('page_title', JText::_('COM_CONTENT_FORM_EDIT_ARTICLE'));
if ($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'));
$this->document->setTitle($title);
$pathway =
$app->getPathWay();
$pathway->addItem($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 15:17:02 +0100 by phpDocumentor 1.4.3