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.8 is now available!


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 »
  • show_menu2 problem: first level menu markup dissappears
  • Print
Pages: [1]   Go Down

Author Topic: show_menu2 problem: first level menu markup dissappears  (Read 5063 times)

Offline stinkywinky

  • Posts: 15
show_menu2 problem: first level menu markup dissappears
« on: July 14, 2009, 05:33:35 PM »
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 ?


Code: [Select]
    <?php
     show_menu2
(
    
$aMenu          = 0,
    
$aStart         = SM2_ROOT,
    
$aMaxLevel      = SM2_ALL,
    
$aOptions       =  SM2_ALL,
    
$aItemOpen      = &#39;
    
[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>}]&#39;,
    
$aItemClose     = &#39;&#39;,
    
$aMenuOpen      = &#39;<!--[if lte IE 6]><table><tr><td><![endif]--><div><ul><li>[if(level>0){<dl><dt>Make a choise:</dt>}]&#39;,
    
$aMenuClose     = &#39;&#39;,
    
$aTopItemOpen   = &#39;&#39;,    
    
$aTopMenuOpen   = &#39;<ul id="block">&#39;
    
);
    
?>

Logged

erpe0812

  • Guest
Re: show_menu2 problem: first level menu markup dissappears
« Reply #1 on: July 14, 2009, 05:44:09 PM »
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
Logged

Offline stinkywinky

  • Posts: 15
Re: show_menu2 problem: first level menu markup dissappears
« Reply #2 on: July 14, 2009, 05:49:08 PM »
The generated HTML code is exactly the same as on a root level page! That's what's so weird!
Logged

erpe0812

  • Guest
Re: show_menu2 problem: first level menu markup dissappears
« Reply #3 on: July 14, 2009, 06:02:01 PM »
Can you post a link?
Logged

Offline stinkywinky

  • Posts: 15
Re: show_menu2 problem: first level menu markup dissappears
« Reply #4 on: July 14, 2009, 06:39:17 PM »
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!
Logged

erpe0812

  • Guest
Re: show_menu2 problem: first level menu markup dissappears
« Reply #5 on: July 14, 2009, 06:45:06 PM »
Fine.

rgds

erpe
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • show_menu2 problem: first level menu markup dissappears
 

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