Adding Site Name and Page Title to Joomla CMS

A sharing on how to add site name and page title to your Joomla template using index.php.

Include these codes in your head:

$mydoc =& JFactory::getDocument();
$mytitle = $mydoc->getTitle();

$conf =& JFactory::getConfig();
$sitename = $conf->getValue(‘config.sitename’);

$mydoc->setTitle($sitename.’ – ‘.$mytitle);

?>

Leave a Reply