WebsiteBaker Community Forum
WebsiteBaker Support (2.8.x) => Templates, Menus & Design => Topic started by: Xagone on March 22, 2011, 06:44:00 PM
-
one of my install of wb 2.8.1 have a strange behavior with show_menu2...
the first menu would not allow
show_menu2(1,SM2_ROOT+1, SM2_ALL, SM2_ALL|SM2_BUFFER,'[li][a][menu_title]</a>','</li>','[ul]','</ul>','<ul id="nav" class="dropdown dropdown-horizontal">');
and would output something like <ul id="nav" class="dropdown dropdown-horizontal"></ul><ul><ul class="menu-top">... rest of the good code
i've circumvent this problem with this code :
$lemenu = show_menu2(1,SM2_ROOT+1, SM2_ALL, SM2_ALL|SM2_BUFFER,'[li][a][menu_title]</a>','</li>','[ul]','</ul>');
echo str_replace('<ul class="menu-top">', '<ul id="nav" class="dropdown dropdown-horizontal">',$lemenu);
but now, we need to add multimenus (activated) with 1 and 2...
no... other... show_menu(X will f'ing work...
I've included the template... I dont event know what to do anymore, normaly I have no problems, but this template is a b...
any clue?
[gelöscht durch Administrator]
-
Hi Olivier,
Your post is not very clear to me..
I know the feeling of things (like show_menu2() ) not working "as you think it should work" very well. In the end there is always a solution 8-)
Could you explain (in a way we Europeans understand too) what the problem is?
-
Just a hint after looking in the attached template..
<?php show_menu2(2,SM2_ROOT+1, SM2_ALL, SM2_ALL|SM2_BUFFER,false,false,'<ul class="avmenuacc">','</ul>'); ?>
It has the SM2_BUFFER option in there. It means it will return (not output) the second menu. Is that the problem?
-
I had to return the menu as buffer because the normal output was problematic and needed to str_replace and repair the output...
because if I tried :
show_menu2(1,SM2_ROOT+1, SM2_ALL, SM2_ALL,'[li][a][menu_title]</a>','</li>','[ul]','</ul>','<ul id="nav" class="dropdown dropdown-horizontal">');
the output is... :
<ul class="menu-top">
<ul id="nav" class="dropdown dropdown-horizontal">
</li>
<li class="menu-sibling"><a href="http://www.mocommunication.com/parcbsl/pages/fr/mission.php" title="Mission" target="_top">Mission</a></li>
<li class="menu-sibling"><a href="http://www.mocommunication.com/parcbsl/pages/fr/services.php" title="Services" target="_top">Services</a></li></ul>
so I had to workaround.....
-
Ok, but the second one has the buffer option enabled, but the data is not captured or used anywhere.
That would be the reason you do not see the second menu.
-
even without buffer, or capture or echoed, no data is output, no error... nothing