[SOLVED] Multiple menus problem

pieterb

I've solved the problem: the structure of the pages must be like this:
NL (menu 1)
  Home (menu 1)
    Page 1 (menu 1)
    etc
NL (menu 2)
  Home (menu 2)
    Page 1 (menu 2)
    etc
EN (menu 1)
  Home (menu 1)
    Page 1 (menu 1)
    etc
EN (menu 2)
  Home (menu 2)
    Page 1 (menu 2)
    etc

Now everything works like a charm.

pieterb

Thanks for your help, but this isn't the problem: even when I simply say show_menu2(2), the menu doesn't show up, although it has been defined in the info.php.

kirk

Please read this tutorial i made for several menus with several languages.

may this help´s

Kirk

https://forum.WebsiteBaker.org/index.php/topic,13577.msg83173.html#msg83173

pieterb

Yes, I have set the right options in Settings page. And yes, I assigned different pages to different menus. My page structure is as follows:

NL
  Home
    Page 1 (menu 1)
    Page 2 (menu 1)
    Page 3 (menu 1)
    Page 4 (menu 1)
    Page 5 (menu 2)
    Page 6 (menu 2)
    Page 7 (menu 2)
    Page 8 (menu 2)
EN
  Home
    Page 1 (menu 1)
    Page 2 (menu 1)
    Page 3 (menu 1)
    Page 4 (menu 1)
    Page 5 (menu 2)
    Page 6 (menu 2)
    Page 7 (menu 2)
    Page 8 (menu 2)

DarkViper

at first:
your info.php is ok
your SM2-calls are ok

but:
did you activate 'multiple menus' in Backend/ Options-extended ?
did you assign the menus to the pages? ( Page-Settings/Options)

without these settings multiple menus never will work.
[url=http://www.youtube.com/watch?v=tmzDAz6ZvFQ]Der blaue Planet[/url] - er ist nicht unser Eigentum - wir haben ihn nur von unseren Nachkommen geliehen[br]
[i]"You have to take the men as they are... but you can not leave them like that !" :-P [/i]
[i]Das tägliche Stoßgebet: [b]Oh Herr, wirf Hirn vom Himmel ![/b][/i]

pieterb

Hi everybody,

Now i've made a fresh install but I still have the same problem... This is my info.php:

<?php

$template_directory 
'liylr_home';
$template_name 'Live in Your Living Room home';
$template_version '1.0';
$template_platform '2.8.x';
$template_author 'Pieter Beulens';
$template_license 'Closed source';
$template_description 'Template for Live in Your Living Room';

$menu[1]    = 'Activiteiten';
$menu[2]    = 'Over ons';

$block[1] 'Over LIYLR';
$block[2] 'Recente optredens';

?>


These are my menu calls:
<nav id="nav_activiteiten">
  <?php show_menu2(1SM2_ROOT+2SM2_START+3SM2_ALL|SM2_NUMCLASS'[li][a][menu_title]</a>''</li>''[ul]''</ul>'falsefalse); ?>
</nav>

and
<nav id="nav_over_liylr">
  <?php show_menu2(2SM2_ROOT+2SM2_START+3SM2_ALL|SM2_NUMCLASS'[li][a][menu_title]</a>''</li>''[ul]''</ul>'falsefalse); ?>
</nav>

As you can see, the only difference in the menu calls is the menu number (1 or 2). I've also tried with the simple show_menu(#) call, but that also doesn't work.

I also get the message "Klik hier om naar de homepagina te gaan" (Click here to go to the homepage) in one of my blocks. Does anyone know where I'm going wrong? I'm hosting locally on Xampp.

pieterb

Hi guys,

Thanks for the tips, but that wasn't the problem I was describing. I know how to create multiple menus and how to access them. The problem was that I did everything correctly, but the content simply didn't show up. The problem was caused by not creating the template first, zipping it and installing it, but I simply copied an existing template and started editing everything (including name, folder etc). I thought that a reload would fix everything, but it didn't. Now I've made a zip file of the template and installed it on a different WB installation and everything works.

snark

in addition to that, you can also add a line in the info.php

menu[9] = do not show in any menu;

now with the menu-choice option in the page settings you can also choose
"do not show in any menu" as an option

since this refers to menu 9 which is not available it will not show up in any menu

seen the fact that almost no template will need 9 menus the menu[9] will result in the same functions as visibillity=hidden. I found out that some people think this is a more logical way of setting the page to not show up in the menu ...


pcwacht

in your templates info.php there are lines saying:
menu[1] = somemenu;
menu[2] = othermenu;

notice the 1 and 2, these are the menunumbers need using
with the shoiwmenu and showmenu2 calls.

for example:
menu[1] = somemenu;
menu[4] = othermenu;
the othermenu is called with showmenu(4)

Have fun,
John
[url="http://www.ictwacht.nl"]http://www.ictwacht.nl[/url] = Dutch ICT info
[url="http://www.pcwacht.nl"]http://www.pcwacht.nl[/url] = My first
both still work in progress, since years.....

pieterb

#1
Hi everybody,

I've switched on use multiple menus in the settings, I've put the menus in my info.php and i've put menu items inside the menus. Thus far no problem. But, when I call show_menu2, only the first of my 2 menus is shown. I've used the following lines to show my menus:
<?php show_menu2(1SM2_ROOT+2SM2_START+3SM2_ALL|SM2_NUMCLASS'[li][a][menu_title]</a>''</li>''[ul]''</ul>'falsefalse); ?>
<?php show_menu2(2SM2_ROOT+2SM2_START+3SM2_ALL|SM2_NUMCLASS'[li][a][menu_title]</a>''</li>''[ul]''</ul>'falsefalse); ?>

So the first menu works perfectly, but the second one doesn't show up at all. I've also tried it with show_menu(2), but again no luck. When i use show_menu2(SM2_ALLMENU) it shows both menus. But when I enter show_menu2(0), only the first menu is shown. Very strange... Can someone put me in the right direction?