WebsiteBaker Support (2.8.x) > Templates, Menus & Design
show_menu2 help
vyni:
Hi, just an idea
You create 2 different menus. If You donĀ“t know how look in the help-pages multiple menus.
One menu for EN-pages and one menu for FR-pages.
In Your index.php put an if-else switch, based on language, to the showmenu-call like this:
--- Code: ---<?php
if (LANGUAGE == 'EN') {
show_menu2(1,SM2_ROOT,SM2_ALL,SM2_ALL,'<li><a h.......>) ';
} else {
show_menu2(2,SM2_ROOT,SM2_ALL,SM2_ALL,'<li><a h.......>) ';
}
?>
--- End code ---
And from now You will only have either this or that menu.
regards from Himberg, next to Vienna
mviens:
Hi Vyni,
Thanks for the recommendation. After many hours of chasing my tale, I actually had a moment of clarity and reverted back to the initial setup I was first trying to do without all the extra coding. This time, I simply moved my EN and FR pages up to the root level next to Home:
HOME (Landing Page - with intro text in EN & FR and links to both languages):
EN
- Section 1
-- Section 1 sub A
-- Section 1 sub A
- Section 2
-- Section 2 sub A
-- Section 2 sub A
FR
- Section 1
-- Section 1 sub A
-- Section 1 sub A
- Section 2
-- Section 2 sub A
-- Section 2 sub A
and then set my menu call as follows:
<?php show_menu2(0, SM2_ROOT+1, SM2_ALL, SM2_ALL|SM2_CURRTREE|SM2_PRETTY, false, false, '<ul class="menu">'); ?>
And everything works just perfectly. I'm not sure why I didn't get this at the beginning but I guess it's all good learning...
Thanks again for your time.
Michael
Navigation
[0] Message Index
[*] Previous page
Go to full version