WebsiteBaker Community Forum (upd)

WebsiteBaker Support (2.8.x) => Templates, Menus & Design => Topic started by: gilly on March 29, 2008, 03:55:35 AM

Title: help needed with advanced show_menu2
Post by: gilly on March 29, 2008, 03:55:35 AM
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:



<div class="menu">    
   <ul>
      <?php show_menu2(1SM2_ROOTSM2_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 -->

Title: Re: help needed with advanced show_menu2
Post by: gilly on March 31, 2008, 04:22:11 AM
any ideas on this guys?
Title: Re: help needed with advanced show_menu2
Post by: ruebenwurzel on March 31, 2008, 08:27:30 AM
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
Title: Re: help needed with advanced show_menu2
Post by: gilly on March 31, 2008, 02:56:26 PM
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.
Title: Re: help needed with advanced show_menu2
Post by: Bennie_wijs on April 01, 2008, 11:22:18 AM
Please read the readme of show_menu2

http://code.jellycan.com/files/show_menu2-README.txt (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
Title: Re: help needed with advanced show_menu2
Post by: gilly on April 02, 2008, 06:11:47 AM
thanks guys, turns out it was something simple.

The <li> needed to be an
Title: Re: help needed with advanced show_menu2
Post by: DGEC on April 03, 2008, 12:56:51 AM
Is it much different from the drop-down menu in the templates generic (own menu system, mostly JS) or allcss2 (all CSS except hover.htc for IE)?