Friday, April 22, 2011

Add a class to body tag for a particular menu

<?php
/**
* Override or insert PHPTemplate variables into the templates.
*/
//In template.php file
  function phptemplate_preprocess_page(&$vars) {
    if(arg(0) == "node" && arg(1) == 2){
      $vars['body_classes'] = $vars['body_classes']." testing";
    }
    return $vars;
  }
?>

No comments:

Post a Comment