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"}
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"}
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