Drupal themeing : Adding active class to the Drupal primary links
Added Tue, 01/29/2008 - 23:43
This little snippet lives in your phptemplate_variables function and will set a useful 'active' class alongside the not so useful menuid-active class which Drupal assigns to the active primary links
foreach($vars['primary_links'] as $key=>$link){
if (strpos($key,'-active')){
$vars['primary_links'][$key]['attributes']['class']='active';
}
}
Bookmark/Search this post with:

Delicious
Digg
Reddit
Technorati




