Actions

Difference between revisions of "Customising the dynamic page title"

From Joomla! Documentation

(New page: '''Customize the dynamic page title''' To customize the page title to add the site name followed by the document title, edit index.php in the template that you are currently using. For ex...)
 
m
Line 1: Line 1:
'''Customize the dynamic page title'''
 
 
To customize the page title to add the site name followed by the document title, edit index.php in the template that you are currently using.  For example, directly after the <head> tag add the following to show "Site Name - Page Name" as the browser's page title:
 
To customize the page title to add the site name followed by the document title, edit index.php in the template that you are currently using.  For example, directly after the <head> tag add the following to show "Site Name - Page Name" as the browser's page title:
  

Revision as of 12:02, 19 November 2008

To customize the page title to add the site name followed by the document title, edit index.php in the template that you are currently using. For example, directly after the <head> tag add the following to show "Site Name - Page Name" as the browser's page title:

<?php
$document =& JFactory::getDocument();
$document->setTitle($mainframe->getCfg('sitename') . " - " . $document->title);
?>