Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 03:59:35 PM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155544 Posts in 21715 Topics by 7737 Members
Latest Member: simpleguy3
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: wtf multi menu problems  (Read 561 times)
Xagone
AddOn Development
*
Offline Offline

Posts: 478



WWW
« 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
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">');
and would output something like
Code:
<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 :
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?
Logged

Xagone Inc. (formerly VotreEspace)
http://www.xagone.com/
Ruud
WebsiteBaker Org e.V.

Offline Offline

Posts: 2297



WWW
« Reply #1 on: March 22, 2011, 11:52:22 PM »

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  cool

Could you explain (in a way we Europeans understand too) what the problem is?
Logged

Professional WebsiteBaker Solutions
Ruud
WebsiteBaker Org e.V.

Offline Offline

Posts: 2297



WWW
« Reply #2 on: March 22, 2011, 11:56:46 PM »

Just a hint after looking in the attached template..
Code:
<?php  show_menu2(2,SM2_ROOT+1SM2_ALLSM2_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?
Logged

Professional WebsiteBaker Solutions
Xagone
AddOn Development
*
Offline Offline

Posts: 478



WWW
« Reply #3 on: March 23, 2011, 01:07:59 PM »

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">');
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>

so I had to workaround.....
Logged

Xagone Inc. (formerly VotreEspace)
http://www.xagone.com/
Ruud
WebsiteBaker Org e.V.

Offline Offline

Posts: 2297



WWW
« Reply #4 on: March 23, 2011, 01:23:03 PM »

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.
Logged

Professional WebsiteBaker Solutions
Xagone
AddOn Development
*
Offline Offline

Posts: 478



WWW
« Reply #5 on: March 23, 2011, 04:10:43 PM »

even without buffer, or capture or echoed, no data is output, no error... nothing
Logged

Xagone Inc. (formerly VotreEspace)
http://www.xagone.com/
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!