static function PageTitle($title, $subtitle = "", $template = 'display_h1') { //echo "Page Title : $title - $subtitle<br>"; $title = JText::_($title); $subtitle = JText::_($subtitle); $mainframe = JFactory::getApplication(); $pageparams = $mainframe->getPageParameters('com_fst'); $document = JFactory::getDocument(); if (FST_Helper::Is16()) { $ptitle = $pageparams->get('page_title', $title); $browsertitle = FST_Helper::TitleString($ptitle, $subtitle); if ($mainframe->getCfg('sitename_pagetitles', 0) == 1) { $browsertitle = JText::sprintf('JPAGETITLE', $mainframe->getCfg('sitename'), $browsertitle); } elseif ($mainframe->getCfg('sitename_pagetitles', 0) == 2) { $browsertitle = JText::sprintf('JPAGETITLE', $browsertitle, $mainframe->getCfg('sitename')); } $document->setTitle($browsertitle); } else { $ptitle = $pageparams->get('page_title', $title); $document->setTitle(FST_Helper::TitleString($ptitle, $subtitle)); } if (FST_Settings::get('use_joomla_page_title_setting')) { $show_title = 1; //print_p($pageparams); if (FST_Helper::Is16()) { // in j1.6/7 can override both browser title, and // page title, and optionally show heading if ($pageparams) { $show_title = $pageparams->get('show_page_heading', 1); } $title = $pageparams->get('page_heading', $title); if ($show_title) { return str_replace("\$1", FST_Helper::TitleString($title, $subtitle), FST_Settings::get($template)); } return ""; } else { if ($pageparams) { $show_title = $pageparams->get('show_page_title', 1); } $title = $pageparams->get('page_title', $title); if ($show_title) { return str_replace("\$1", FST_Helper::TitleString($title, $subtitle), FST_Settings::get($template)); } return ""; } } else { return str_replace("\$1", FST_Helper::TitleString($title, $subtitle), FST_Settings::get($template)); } }