I’m having a problem changing images on my menu and I was hoping someone could help me out with it.
I have a menu that get generated in a PHP block, BTW I’m using Drupal. I’ll post some of my code:
function dune_primary_links() {
$links = menu_primary_links();
$i = 1;
if ($links) {
foreach ($links as $link) {
/*$s = (explode("title=", $link));
$title = (explode(" ", $s[1]));
$title = (explode('"', $title[0]));*/
$link = str_replace('<a ', '<a onclick="" ', $link);
if ($i == 1) {
$output .= '<td class="mirrortab_active_first" />';
$output .= '<td valign="top" class="mirrortab_active_back">' . $link . '</td>';
$output .= '<td class="mirrortab_active_last" />';
}
else
$output .= '<td valign="top" class="mirrortab_back">' . $link . '</td>';
$i++;
}
}
return $output;
}
and here is my html page
<td class="mirrortab_first" />
<?php if (isset($primary_links)) { ?><?php print dune_primary_links() ?><?php } ?>
<td class="mirrortab_last" />
ok so here is my question. I want to be able to change the whole section when someone click on the desire menu. This way when the user click the menu the section he got to choose is going to get highlighted.
And here is an image of the menu, you’ll see I want to change the lighter blue version to be on the one the user selected.
Cheers and thanks for the help.