WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Templates, Menus & Design => Topic started by: vanbemmel on April 07, 2008, 12:34:19 PM

Title: Remove classes from showmenu2
Post by: vanbemmel on April 07, 2008, 12:34:19 PM
Hello,

we use show_menu2 in our WB installation as follows.

show_menu2(0, SM2_ROOT, SM2_ALL, SM2_ALL, false, "\n", false, false, false, "\n");

But this generates also a lot of extra classes like these:
* menu-current
* menu-first
* menu-expand
* menu-sibling

In our stylesheet we don't use these classes so the menu is not displayed right.
When we change the function "show_menu2" in modules\show_menu2\include.php on line 402 these changes are not visible and seems to be cached. 

Who can help us out?

Thank you.
Title: Re: Remove classes from showmenu2
Post by: ruebenwurzel on April 07, 2008, 12:49:52 PM
Hello,

there is no need for changes in the include.php of show_menu2. Please read the docu, wich comes with the modul. You can adapt fully show_menu2 to use your classes. From the first look in your menucall i see that you the parameters with a wrong syntax. So please read the doku, how to set the paramters right.

Matthias
Title: Re: Remove classes from showmenu2
Post by: vanbemmel on April 07, 2008, 03:19:48 PM
Hi Matthias,

thank you for your quick reply.  I read the manual three times but cannot find out how we can skip the class parts. We only need the <li> and <ul> output of show_menu2.

Can you help us a bit with this?
Title: Re: Remove classes from showmenu2
Post by: ruebenwurzel on April 07, 2008, 05:01:50 PM
Hello,

all is written in the docu

Code: [Select]
show_menu2(0, SM2_ROOT, SM2_ALL, SM2_ALL, <li>[a][menu_title]</a>, </li>, '<ul>', '</ul>');
gives you only a list without classes

Matthias
Title: Re: Remove classes from showmenu2
Post by: vanbemmel on April 09, 2008, 06:06:48 PM
Hi Matthias,

thank you, it works great this way!
The only thing is that when we click on a submenu only the submenu's at the same level are displayed and not the main menu's. Where can we change that?

Kind regards.
Title: Re: Remove classes from showmenu2
Post by: ruebenwurzel on April 09, 2008, 06:36:37 PM
Hello,

again, this is written in the docu. Please read it.

Matthias
Title: Re: Remove classes from showmenu2
Post by: vanbemmel on April 09, 2008, 10:24:54 PM
How is this called then?   I don't know what to look for in the docu....
Title: Re: Remove classes from showmenu2
Post by: doc on April 09, 2008, 10:40:47 PM
Hello,

think the documentation Matthias is referring to is this one here (http://code.jellycan.com/files/show_menu2-README.txt). Have a look at the description of parameters. In addition check out the demo page (http://code.jellycan.com/sm2test/) to see different parameters of show_menu2 live.

Regards Christian
Title: Re: Remove classes from showmenu2
Post by: ruebenwurzel on April 10, 2008, 06:43:25 AM
@christian

vanbemmel knows the docu, he has read it several times

@vanbemmel

if you use my code from above all pages and all subpages are shown even if a submenu is expanded.

Matthias