WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • help needed with advanced show_menu2
  • Print
Pages: [1]   Go Down

Author Topic: help needed with advanced show_menu2  (Read 7104 times)

gilly

  • Guest
help needed with advanced show_menu2
« 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:

Code: [Select]

<div class="menu">    
   <ul>
      <?php show_menu2(1, SM2_ROOT, SM2_ALL,SM2_ALL|SM2_PRETTY,&#39;<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]-->}]&#39;,&#39;&#39;,&#39;&#39;,&#39;&#39;); ?>


   </ul>       
         
</div><!-- end menu -->

Logged

gilly

  • Guest
Re: help needed with advanced show_menu2
« Reply #1 on: March 31, 2008, 04:22:11 AM »
any ideas on this guys?
Logged

Offline ruebenwurzel

  • Betatester
  • **
  • Posts: 8544
  • Gender: Male
  • Keep on Rockin
    • Familie Gallas Online
Re: help needed with advanced show_menu2
« Reply #2 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
Logged

gilly

  • Guest
Re: help needed with advanced show_menu2
« Reply #3 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.
Logged

Offline Bennie_wijs

  • Posts: 229
  • Gender: Male
  • I believe what I want to Believe.
    • www.www.motortreffen.net
Re: help needed with advanced show_menu2
« Reply #4 on: April 01, 2008, 11:22:18 AM »
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
Logged
I believe what I want to Believe

gilly

  • Guest
Re: help needed with advanced show_menu2
« Reply #5 on: April 02, 2008, 06:11:47 AM »
thanks guys, turns out it was something simple.

The <li> needed to be an

  • ie     <li> means no classnames will be shown
       
  • means all classnames will be shown

    It doesnt really make this clear in the readme.
Logged

Offline DGEC

  • Posts: 388
  • Gender: Male
    • EbelTech homepage
Re: help needed with advanced show_menu2
« Reply #6 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)?
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • help needed with advanced show_menu2
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2