http://developer.joomla.org/sf/go/artf2076?nav=1
Title: SEO & Usability - Page Titles Format - from 4.5.3
Description: SEO and Usability are Enhanced by Specific Page Titles
Mamb-no 4.5.3-alpha (and now the beta) allow selection of the page titles format in the SEO section of the
configuration screen via a drop-down box.
Page Titles Format
Site - Title
Title - Site
Title only
Joomla 1.0.x and 1.1.x do not include this feature.
From mambo.php:
Code: Select all
function setPageTitle( $title=null ) {
if ( @$GLOBALS['mosConfig_pagetitles'] ) {
$title = trim( htmlspecialchars( $title ) );
switch ( $GLOBALS['mosConfig_pagetitles_format'] ) {
case 2:
// <title> Title - Site </title>
$title = $title .' - '. $GLOBALS['mosConfig_sitename'];
break;
case 3:
// <title> Title </title>
break;
case 1:
default:
// <title> Site - Title </title>
$title = $GLOBALS['mosConfig_sitename'] . ' - '. $title;
break;
}
$this->_head['title'] = $title;
}
}
From Joomla classes.php:
Code: Select all
function setPageTitle( $title=null ) {
if (@$GLOBALS['mosConfig_pagetitles']) {
$title = trim( htmlspecialchars( $title ) );
$this->_head['title'] = $title ? $GLOBALS['mosConfig_sitename'] . ' - '. $title : $
GLOBALS['mosConfig_sitename'];
}
}
EVEN BETTER (than Mamb-no) - allow a custom home page title
Add an input box to the config screen to enter the TEXT below.
Something like this, but with a variable for the text.
Code: Select all
function setPageTitle( $title=null ) {
global $option;
if (@$GLOBALS['mosConfig_pagetitles']) {
$title = trim( htmlspecialchars( $title ) );
if ($option=="com_frontpage") { $this->_head['title'] = $GLOBALS['mosConfig_sitename']
. " - YOUR PAGE TITLE HERE"; }
else {
$this->_head['title'] = $title ? $title . " - ". $GLOBALS['mosConfig_sitename'] :
$GLOBALS['mosConfig_sitename'];}
}
}
Custom Page Titles discussion in old forum:
http://forum.mamboserver.com/showthread.php?t=25027
Page Title/Site Title questions are starting to show up here in the Joomla forums.
Same requests again.