Shape 5

Joomla Templates => Incline - Club => : aalekizogl April 06, 2015, 08:42:56 AM



: Article Title -> Page Title
: aalekizogl April 06, 2015, 08:42:56 AM
Hi,

Using incline theme, I want to get the article title to be show as the page title. Now I get the menu title instead. Also I wanted to get a [article title] | [MY SITE] behavior. I suppose this has something to do with Joomla 3.3.6.


: Re: Article Title -> Page Title
: mikenicoll April 06, 2015, 07:57:14 PM
Hello,

Could you be more specific? The article title is a setting in Joomla itself but you can also adjust the Page Title setting under the Menu Parent. The Template doesn't control these outputs though, that is all through the Joomla back end.


: Re: Article Title -> Page Title
: aalekizogl April 07, 2015, 01:31:23 AM
Mike,

thanks for replying. It seems I hit a new Joomla 3.3 feature. What I wanted was to have the article title shown as the browser page title. As I understand this is done by placing the title in the menu's "Page display->Browser Page Title" attribute. Rather I created a new ../templates/incline/html/com_content/article/default.php override with

:
....
// Fix Joomla 1.6+ title bug
$app = JFactory::getApplication();
$menu = $app->getMenu();
$menuTitleOverride = $menu->getActive()->params->get('page_title');

$config =& JFactory::getConfig();
$prefixSuffix = $config->get( 'sitename_pagetitles' );

$document=& JFactory::getDocument();
$document->setTitle( (1 == $prefixSuffix ? $config->get( 'sitename' ).' | ' : '') . ($menuTitleOverride ? $menuTitleOverride : $this->item->title) . (2 == $prefixSuffix ? ' | '.$config->get( 'sitename' ) : '') );   
....

You are correct this is not a template's problem. Thank you anyway.


: Re: Article Title -> Page Title
: mikenicoll April 07, 2015, 03:47:34 PM
No worries. Thanks for the reply :)