WebsiteBaker Support (2.8.x) > Templates, Menus & Design
wtf multi menu problems
Xagone:
one of my install of wb 2.8.1 have a strange behavior with show_menu2...
the first menu would not allow
--- Code: ---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">');
--- End code ---
and would output something like
--- Code: ---<ul id="nav" class="dropdown dropdown-horizontal"></ul><ul><ul class="menu-top">... rest of the good code
--- End code ---
i've circumvent this problem with this code :
--- 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);
--- End code ---
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]
Ruud:
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?
Ruud:
Just a hint after looking in the attached template..
--- Code: ---<?php show_menu2(2,SM2_ROOT+1, SM2_ALL, SM2_ALL|SM2_BUFFER,false,false,'<ul class="avmenuacc">','</ul>'); ?>
--- End code ---
It has the SM2_BUFFER option in there. It means it will return (not output) the second menu. Is that the problem?
Xagone:
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 :
--- Code: ---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">');
--- End code ---
the output is... :
--- Code: ---<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>
--- End code ---
so I had to workaround.....
Ruud:
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.
Navigation
[0] Message Index
[#] Next page
Go to full version