I am trying to change the site name when a user enters specific pages on my website.
I know the variable for the site name is $site_name
and is being retrieved from the system.tpl.html file.
So I am trying to set different site names depending the URL; for example, when a user visits /about_us, the site name should change.
In my template.php file, I have captured the path in a variable.
$path = drupal_get_path_alias();
if ($path == 'about_us') {
$site_name = 'New title';
}
This won't work.
How can this be achieved?