Currently, I am excited about incorporating CSS styling based on taxonomy terms, particularly for the body tag where I aim to include the current terms.
Here is my progress so far :
function _phptemplate_variables($hook, $vars = array()) {
global $node;
switch ($hook) {
case 'page': die ('test');
$vars['body_class'] = '';
if (arg(0) == 'taxonomy' && arg(1) == 'term' && is_numeric(arg(2))) {
$vars['body_class'] = 'theme'.arg(2);
}
if (arg(0) == 'node' && is_numeric(arg(1))) {
$node = node_load(arg(1));
if (is_array($node->taxonomy)) {
foreach ($node->taxonomy as $term) {
$vars['body_class'] .= 'theme'.$term->tid;
}
}
}
if (drupal_is_front_page()) {
$vars['body_class'] .= ' front';
}
break;
}
return $vars;
}
Although I believe the code is correct, it doesn't seem to be getting called (hence the 'die' function). I am using a simple phptemplate engine with a basic Drupal 6 installation.
What could I possibly be overlooking here?