diff --git a/src/components/com_tjucm/site/views/itemform/view.html.php b/src/components/com_tjucm/site/views/itemform/view.html.php index 705f2dab..b704698c 100644 --- a/src/components/com_tjucm/site/views/itemform/view.html.php +++ b/src/components/com_tjucm/site/views/itemform/view.html.php @@ -80,6 +80,15 @@ class TjucmViewItemform extends JViewLegacy */ protected $copyRecId; + /** + * The Title of view + * + * @var String + * + * @since 1.2.4 + */ + protected $title; + /** * Display the view * @@ -307,7 +316,7 @@ protected function _prepareDocument() { $app = Factory::getApplication(); $menus = $app->getMenu(); - $title = null; + $this->title = null; // Because the application sets a default page title, // we need to get it from the menu item itself @@ -322,22 +331,22 @@ protected function _prepareDocument() $this->params->def('page_heading', Text::_('COM_TJUCM_DEFAULT_PAGE_TITLE')); } - $title = $this->params->get('page_title', ''); + $this->title = $this->params->get('page_title', ''); - if (empty($title)) + if (empty($this->title)) { - $title = $app->get('sitename'); + $this->title = $app->get('sitename'); } elseif ($app->get('sitename_pagetitles', 0) == 1) { - $title = Text::sprintf('JPAGETITLE', $app->get('sitename'), $title); + $this->title = Text::sprintf('JPAGETITLE', $app->get('sitename'), $this->title); } elseif ($app->get('sitename_pagetitles', 0) == 2) { - $title = Text::sprintf('JPAGETITLE', $title, $app->get('sitename')); + $this->title = Text::sprintf('JPAGETITLE', $this->title, $app->get('sitename')); } - $this->document->setTitle($title); + $this->document->setTitle($this->title); if ($this->params->get('menu-meta_description')) {