show_menu2 problem: first level menu markup dissappears


stinkywinky

Found the solution! Second level pages without a submenu lose their classes;

<li class="menu-sibling"> becomes <li class="">

I didn't have any markup for li's without a class. Editing my CSS solved the problem!

Thanks for your help!


stinkywinky

The generated HTML code is exactly the same as on a root level page! That's what's so weird!

erpe0812

Hello

please read the html output of your page and see, which classes your first level items have ( I assume something with menu-parent).
Format the class in your css file and you are done.

It is always helpful to post a link to your site so everyone can have a look.

rgds

erpe

stinkywinky

I use this code to show my menu. It works until i click on a second level item. The markup dissapears!

Example:

Item 1
|--- Subitem 1.1
Item 2
|--- Subitem 2.1
Item 3
|--- Subitem 3.1

When i enter the site, everything is perfect. When i click on, for example, subitem 1.1, the markup for Item 1, Item 2, Item 3 dissapears. If i go back to the root level of the site, everything is perfect again, until i click on a subitem.



What am i doing wrong ?



    <?php
     show_menu2
(
    
$aMenu          0,
    
$aStart         SM2_ROOT,
    
$aMaxLevel      SM2_ALL,
    
$aOptions       =  SM2_ALL,
    
$aItemOpen      '
    [if(class!=menu-expand && level==0){[list][li][a][menu_title]</a></li>}]
    [if(class!=menu-expand && level>0 && class!=menu-last){<dd>[a][menu_title]</a></dd>}]
    [if(class!=menu-expand && level>0 && class==menu-last){<dd>[a][menu_title]</a></dd></dl>}]
    [if(class==menu-expand){[list][li][a][menu_title]<!--[if gte IE 7]><!--></a><!--<![endif]-->}]
    [if(class==menu-last && level==0){</ul>}]
    [if(class==menu-last && level>0){</li></ul></div><!--[if lte IE 6]></td></tr></table></a><![endif]--></li>}]'
,
    
$aItemClose     '',
    
$aMenuOpen      '<!--[if lte IE 6]><table><tr><td><![endif]--><div><ul><li>[if(level>0){<dl><dt>Make a choise:</dt>}]',
    
$aMenuClose     '',
    
$aTopItemOpen   '',    
    
$aTopMenuOpen   '<ul id="block">'
    
);
    
?>