Wednesday, November 23, 2011

Setting Browser Title for Each Pages

Setting Browser Title for Each Pages: 

While Creating a page or node in a site,we should give the browser title,
for that we need to give this code inside the phptemplate_preprocess_page function in template.php.
for Example if your page is Contact Us and the url is contact_us,you need to write the code like this,

function phptemplate_preprocess_page(&$variables) {
    $path = drupal_get_path_alias($_GET['q']);
    if($path == 'contact_us'){
       $variables['head_title'] = 'Your Project Name - Contact Us';


No comments:

Post a Comment