When the site http://filipinoengineer.org came online, Joomla 1.5 was still in the beta stage, thus the decision was to use Joomla 1.x. I have used a third party script to implement "Search Engine Friendly" URL.
In a few months, the site received "Page Rank 5" from Google until it was decided to upgrade to Joomla 1.5. I noticed that the website page rank started to deteriorate. I tried to implement several SEO methodologies including submission to several search engines where all I got was spam emails.
All my efforts were unsuccessful until now as the page rank of http://filipinoengineer.org is now zero.
Lately, I tried comparing Joomla 1.X and Joomla 1.5. I found out that in Joomla 1.5, the page title except the home page does not include the configuration file "Site Name" variable. In Joomla 1.X, the "Site Name" is always a part of the page title as a prefix.
Is this an intentional omission by the Joomla developers? Or the developers of Joomla missed it?
I have searched the Joomla forum but there has been no concrete solution to the issue. I have found a solution myself.
To include the "Site Name" on all pages, I did some hacks on the Joomla Core. I should not be doing this but I am already desperate on to increase the website page ranking.
This hack may not be the best solution but it worked for me and I want to share it to others.
Search for the file head.php under the "libraries/joomla/document/html/renderer" folder. Search for this line
$strHtml .= $tab . '<title>' . htmlspecialchars($document->getTitle()) . '</title>' . $lnEnd;
And replace it withe the following
// SEO Hack
// declare a new configuration variable
$config = new JConfig();
// do not add the site name on the Frontpage
if(( $_SERVER['REQUEST_URI'] == '/') || ( $_SERVER['REQUEST_URI'] == '' ) ) $site_name = '';
else $site_name = $config->sitename . " - ";
// Modifiled version
$strHtml .= $tab . '<title>' . $site_name . htmlspecialchars($document->getTitle()) . '</title>' . $lnEnd;
This hack will include the Site Name is all pages separated by the character "-" (replace this with any character you want).
Update: This hack has been updated.
Popularity: 9%

Darn it… It did not work. said there was a extra “;” on line 89. I don’t know line 89 from 85. Loaded into a text editor and it says the line in question is:
if(( $_SERVER['REQUEST_URI'] == ‘/’) || ( $_SERVER['REQUEST_URI'] == ” ) ) $site_name = “;
so I removed the end “;” because it is the only one on that line, but then I got a new error.
Hi weebit,
I have used this hack so I know it works.
You mentioned about this line
if(( $_SERVER['REQUEST_URI'] == ‘/’) || ( $_SERVER['REQUEST_URI'] == ” ) ) $site_name = “;
If you copied the code in my post directly and pasted it, Windows has a bad habit of replacing apostrophe with tilde. Make sure you have corrected this problem.
I saved it in a text file, and checked every Character to make sure it copied over ok. I will give it a run again this evening.
Thanks, it really work after some minor editing and adjustment
Hi there
Thanks – this is was I was looking for
I use scipt as below:
#old one – only article title as page title
# $strHtml .= $tab.”.htmlspecialchars($document->getTitle()).”.$lnEnd;
#SEO Hack
// declare a new configuration variable
$config = new JConfig();
// do not add the site name on the Frontpage
if(( $_SERVER['REQUEST_URI'] == ‘/’) || ( $_SERVER['REQUEST_URI'] == ” ) ) $site_name = ”;
# article title first
else $site_name = ” – “.$config->sitename;
#site name first
#else $site_name = $config->sitename.” – “;
// make the title tag
# article title first
$strHtml .= $tab . ” . htmlspecialchars($document->getTitle()) . $site_name. ” . $lnEnd;
#site name first
#$strHtml .= $tab . ” . $site_name. htmlspecialchars($document->getTitle()) . ” . $lnEnd;
If you need, it’s just simple “#” adding and deleting to get [site name - article title] or [article title - site name] title tag.
any updates coming ?
Thank you for hack. I do not want to mess the default files so did this little bit differently.
The more permanent way is to add code to your page-template and not mess with Joomla default and updatable files. Just add code just after usual:
—
<?php
// Prevent direct access sans Joomla!:
—
in template. Code to add (edit for your liking):
sitename;
// get doc and docs title
$mydoc =& JFactory::getDocument();
$mytitle = $mydoc->getTitle();
// update title
$mydoc->setTitle($site_name.’ – ‘.$mytitle);
?>
Hope this add comment correctly , code to add is:
sitename;
// get doc and docs title
$mydoc =& JFactory::getDocument();
$mytitle = $mydoc->getTitle();
// update title
$mydoc->setTitle($site_name.’ – ‘.$mytitle);
?>
I truly don’t understand why Joomla! don’t incorporate this in their core codes. This issue has been there since the beginning of J1.5.