Babel and Menu Manager start point problem

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
kochiro
Forum Members
Forum Members
Posts: 15
Joined: Wed Sep 09, 2009 9:09 pm
Location: Sweden

Babel and Menu Manager start point problem

Post by kochiro »

I have a site that is in English but now I need to make it multi-language.  First I will detail out how it is currently working and then I will show what changes I have made and what isn't working.

Existing Navigation:
1. Home
2. Products
     2.1 Software
     2.2 Hardware
3. Services

If you click on one of the top level navigation items such as "Products" the following code will be executed in the template and it will show a vertical menu.

Code: Select all

{$cgsimple->get_root_alias('','root_alias')}
{menu template='Vertical Menu' start_page="$root_alias" collapse="1"}
Resulting Menu:
Products
     Software
     Hardware

To make my site multi-language I have installed the Babel module and re-configured my navigation to be as follows:

1. English
     1.1 Home
     1.2 Products
          1.2.1 Software
          1.2.2 Hardware
     1.3 Services
2. Swedish
     1.1 Starta
     1.2 Produkter
          2.2.1 Mjukvara
          2.2.2 Hårdvara
     2.3 Tjänster

I have altered the menu creation code to include the "start_level=2" option so that the vertical menu will exclude the language items.

Code: Select all

{$cgsimple->get_root_alias('','root_alias')}
{menu template='Vertical Menu' start_page="$root_alias" collapse="1" start_level="2"}
However the problem now is that because of the "root_alias" line it will also include the "Home" and "Services" sections like this:

Resulting Menu:
Home
Products
     Software
     Hardware
Services

What I need to know is how to detect dynamically the root_alias of the page just below the language, in the example of clicking on "Products" it would be the item number 1.2.  If I was to click on Products and then on Software I would still want to get the 1.2 Products item as the start_page.

Thanks,
Jay
Post Reply

Return to “Modules/Add-Ons”