WebsiteBaker Support (2.8.x) > Templates, Menus & Design

show_menu2 help

(1/2) > >>

o_nantes:
Hi everybody,
I have a strange behavior with the use of show_menu2 : I can only display a full deployed  menu.
Explanations :
here's the website : http://www.drapes-aeriens.com
I use 2 languages FR and EN.
I have a second navigation bar on the left called by this fonction :

 show_menu2(2, 76, SM2_ALL, SM2_ALL);

Where :
2 is the menu number
76 the page id where begins the display of the menu (this page is hidden)

I tried all the possible options but the only way to display something else than a blank menu is :  SM2_ALL, SM2_ALL !!
And I need a "auto trim" menu (displaying the childs only where I'm on it)

So, I need a show_menu2 expert to stop my headhache :)
Thank you for your help

BerndJM:
Hi,

you need a "auto" trim, why don't use SM2_TRIM ?

--- Code: --- show_menu2(2, 76, SM2_ALL, SM2_TRIM);

--- End code ---

Regards Bernd

o_nantes:
Thank you Bernd for your reponse.
I tried that but it  doesn't work, in fact it works only if i'm already in one page of the sub menu (menu (2))  but when i call a page from the menu(1) the menu(2) doesn't display at all
I finally think it looks like a bug.


--- Quote from: BerndJM on November 02, 2008, 05:17:02 PM ---Hi,

you need a "auto" trim, why don't use SM2_TRIM ?

--- Code: --- show_menu2(2, 76, SM2_ALL, SM2_TRIM);

--- End code ---

Regards Bernd

--- End quote ---

brofield:
Are you sure that you have configured the menus correctly? You appear to be using two different techniques at the same time: multiple menus (menu 2), and differently rooted menus (en and fr).

I have never seen a point in the multiple menu option (as implemented in WB2), I think that using differently rooted menus is the easier to understand way.
http://help.WebsiteBaker.org/pages/en/advanced-docu/designer-guide/multilingual-websites.php

Most likely this is a problem with your menu configuration. I would suggest changing to a single menu and using different roots.

Brodie

mviens:
I've read through a lot of the strings about multilingual sites and menus and haven't yet found an answer to my situation.

I have the following setup using:
show_menu2(0, SM2_ROOT+2, SM2_ALL, SM2_ALL|SM2_PRETTY, false, false, '<ul class="menu">'); ?>

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

But can't quite get the hang of Jellycan to show only/all the English pages/sub pages in the English section and likewise for the French.

I tried:
show_menu2(0, SM2_ROOT+2, SM2_ALL, SM2_TRIM
but then subpages didn't show up unless you clicked on the parent page.

Any help is always much appreciated.

Michael

Navigation

[0] Message Index

[#] Next page

Go to full version