WebsiteBaker Support (2.8.x) > Templates, Menus & Design
help needed with advanced show_menu2
gilly:
Hey, I am trying to implement an horizontal dropdown menu (like that seen in multiflex3).
The main difference with mine is that I need the last list item to have a class name attached to it (eg "menu-last").
I could do this easily using the standard show_menu2 call, however then I wouldnt be able to insert the IE6 tags to make it work in IE6.
Any help with this would be greatly appreciated.
Here is my current code:
--- Code: ---
<div class="menu">
<ul>
<?php show_menu2(1, SM2_ROOT, SM2_ALL,SM2_ALL|SM2_PRETTY,'<li>[a][menu_title]
[if(class==menu-expand){<!--[if IE 7]><!--></a><span>|</span><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]--><ul>}]
[if(class!=menu-expand){</a> <span>|</span>}]
[if(class!=menu-last){</li>}]
[if(class==menu-last){</li></ul><!--[if lte IE 6]></td></tr></table></a><![endif]-->}]','','',''); ?>
</ul>
</div><!-- end menu -->
--- End code ---
gilly:
any ideas on this guys?
ruebenwurzel:
Hello,
read the docu wich comes with show_menu2 and for your wishes you need to have knowledge in HTML and CSS. This is no WB related question, it is more normal html and css. We support here only WB questions.
Matthias
gilly:
actually my question is not related to html or css at all.
My site works fine as a static html site, it was when I ported it over to a website baker template with a dynamic navigation that I run into problems.
I want to know how to use the show_menu2 code to make website baker know to add all the class names to each of the list items.
Bennie_wijs:
Please read the readme of show_menu2
http://code.jellycan.com/files/show_menu2-README.txt
Default with show_menu2 it has classess for all items:
OUTPUT
======
The menu is output differently depending on what parameters have been
supplied to the function, however in general the following classes are used
for each menu. Note that items will have multiple classes when relevant.
CLASS ATTACHED TO
------------ -------------------------------------------------------
menu-top First menu tag only
menu-parent Every parent menu item of the current page.
menu-current Only the menu item for the current page.
menu-sibling Every sibling of the current page.
menu-child Every sub-menu of the current page.
menu-expand Every menu item with children.
menu-first First item in any menu or sub-menu.
menu-last Last item in any menu or sub-menu.
Hope this helps
Navigation
[0] Message Index
[#] Next page
Go to full version