Modify Joomla Page Title for SEO
For Joomla 1.0.x (click here for Joomla 1.5)
Joomla’s standard way of displaying page titles is with the Site Name first, a dash, and then the title of the content. This is not the best way to display the page title for search engine optimization (SEO). The page title is a very important element in determining the relevance and ranking of your page to a keyword search. The search engines consider the first part of the page title the most important, so altering the page title so that the content title comes first and the Site Name second is a definite improvement. This is easily changed in /includes/joomla.php. Find the following text around line 503:
function setPageTitle( $title=null ) { if (@$GLOBALS['mosConfig_pagetitles']) { $title = trim( htmlspecialchars( $title ) ); $title = stripslashes($title); $this->_head['title'] = $title ? $GLOBALS['mosConfig_sitename'] . ' - '. $title : $GLOBALS['mosConfig_sitename']; } }
and change to this:
function setPageTitle( $title=null ) {if (@$GLOBALS['mosConfig_pagetitles']) { $title = trim( htmlspecialchars( $title ) ); $title = stripslashes($title); $this->_head['title'] = $title ? $title .' - '. $GLOBALS['mosConfig_sitename'] : $GLOBALS['mosConfig_sitename']; } }
Having the same Site Name on every page of your site, however only serves to reduce the relevance of each page title to the keyword search and your targeted content. To completely remove the Site Name, instead replace the function above with this:
function setPageTitle( $title=null ) { if (@$GLOBALS['mosConfig_pagetitles']) { $title = trim( htmlspecialchars( $title ) ); $title = stripslashes($title); $this->_head['title'] = $title ? $title : $GLOBALS['mosConfig_sitename']; } }



Thank you very Much…….
What vesion of Joomla is this??
I tend to favour using plugins rather than hacking core code, there’s a few which will do this (SH404 is my favourite)
Joomla 1.5 handles this stuff much better as well.
Nice tutorial though
John
I have a similar tutorial written for Joomla 1.5.
Check it out:
http://paulmason.name/blog/item/customizing-joomla-page-titles