Download our free how-to guide for setting up your new Drupal site and using our themes

Page Title

The default way your page title appears in the browser’s window title bar and in search engine results, such as google.com, is as follows:

Drupals default page header format

(Site front page) SITE NAME | SITE SLOGAN

(All other pages) NODE TITLE | SITE NAME

This is widely regarded as the best approach, as people reading English read from left-to-right and are usually using a search engine to search for a topic, rather than a specific site. Therefore, it’s arguably more ergonomic to leave the Drupal default.

Changing how your page titles are constructed

      1.Open your page.tpl.php file in a text editor

      2.At the very top of the file, you should see the following line

<title>
<?php print $head_title; ?>
</title>

 

      3.Change to:

<title>
<?php
print "$title | $site_name | $site_slogan";?> 
</title>

 

      4.As the variable names suggests, that re-orders your page tite to read: NODE TITLE | SITE NAME | SITE SLOGAN

      5.Upload your edited page.tpl.php file to your active theme folder for the changes to take effect.

For a full list of all the variables available, visit the page.tpl.php overview page in the phptemplate section of the handbook at drupal.org - http://drupal.org/node/11812