Hi all and nice to meet you,
I am a newbie so please be patient with me :)
I am building my first drupal website and one of the things I am struggling with is the menu active state.
The site I am building has an horizontal graphic primary menu on the top, and then a secondary menu on the left side (I created different menus for every item of the primary menu and made each of them visible only to some pages).
This is the code in the page.tpl.php
<div id="menu">
<?php if ($primary_links){
$old_links = theme('links', $primary_links, array('class' => 'links primary_menu'));
$new_links = str_replace('">home', '"><span>home', $old_links);
$new_links = str_replace('">about', '"><span>about', $new_links);
$new_links = str_replace('">what', '"><span>what', $new_links);
$new_links = str_replace('">how', '"><span>how', $new_links);
$new_links = str_replace('">clients', '"><span>clients', $new_links);
$new_links = str_replace('">media', '"><span>media', $new_links);
$new_links = str_replace('">contact', '"><span>contact', $new_links);
$new_links = str_replace('</a>', '</span></a>', $new_links);
print $new_links;
}
if (count($secondary_links)){
print theme('links', $secondary_links, array('class' => 'links secondary_menu'))
}
?>