This is my "left menu" it appears as an include in all the pages:
<?php
// array of pages for the left menu
$left_menu_items = array(
'book.php' => 'Book Design',
'identityDesign.php' => 'Identity Design',
'logos.php' => 'Logos',
'packaging.php' => 'Packaging',
'index.php' => 'Selected Projects',
);
// start the html string for menu
$l_menu = ' <ul>';
// add all the ittems from the $top_menu_items array
foreach($left_menu_items as $url => $text) {
if($script_name == $url) {
// if the item in the array is the current page, highlight it
$l_menu .= '<li><a style="font-color:#eb0089" href="#nogo">'. $text . ' </a></li>';
} else {
// else display it as usual link
$l_menu .= '<li><a href="' . $url . '">' . $text . '</a></li>';
}
}
$l_menu .= '</ul>';
echo $l_menu;
?>
how can i show or hidden submenu items?
For example if someone clicks on Book Design it opens a page (the book design page) with:
1) the Book Design list item in red
2) the Book Design submenu items
3) the submenu should behave as the "left menu" behaves: if i click on one of the items they open a detail page with the item title in the menu in red
4) if i click on "Identity Design" all the "Book Design" items disappear and i can see the "Identity Design" subitem instead
if someone can help it will be great - thanks