WebsiteBaker Support (2.8.x) > Templates, Menus & Design

show_menu2 question

<< < (3/3)

jschor:
When i look at the generated html i get this

<li class="menu-expand menu-parent">Eten &amp; drinken
   <ul class="">
   <li class="menu-current menu-first"><a href="http://195.238.74.250/~amstel/wb/pages/eten-drinken/lunch.php" target="_top">Lunch</a></li>
   <li class="menu-sibling"><a href="http://195.238.74.250/~amstel/wb/pages/eten-drinken/diner.php" target="_top">Diner</a></li>
   <li class="menu-sibling"><a href="http://195.238.74.250/~amstel/wb/pages/eten-drinken/groepen.php" target="_top">Groepen</a></li>
   <li class="menu-sibling menu-last"><a href="http://195.238.74.250/~amstel/wb/pages/eten-drinken/borrel.php" target="_top">Borrel</a></li>
   </ul>
   </li>

Looks Ok with the closing doesn't it?

Well we don't have to spend to much time at this. The site has to be online this weekend and it worked before so i will keep the first levels "clickable" and create some "general" pages for the 1st level for the time beeing.

Maybe you or someone else can have a look at this later because it would be a nice option for the menu.

For now i don't want to take to much of your time unless there is a brilliant idea.

Thanks for your help anyway.

Steven:
Hi Guys,

Maybe it's not brilliant but I came up with this code:


--- Code: ---<?php show_menu2(0, SM2_ROOT, SM2_ALL, SM2_ALL, &#39;[if(class!=menu-expand){[li][a][menu_title]</a>}][if(class==menu-expand){[li]<a href=#>[menu_title]</a>}]&#39;, "\n</li>", false, false, false, &#39;<ul id="header_menu" class="menu">&#39;); ?>
--- End code ---

It works for me. It doesn't affect the layout of the menu either because the <a href in the code makes it still act as a link which you have defined in the CSS for the menu....


Cheers,

Steven

Navigation

[0] Message Index

[*] Previous page

Go to full version