Page 1 of 1

Menu Query

Posted: Sat Dec 01, 2007 11:07 pm
by aidank
Hi guys,

I am building a website using CMSMS and I am looking at modifying how my top and left navigations function. I am currently working off a test environment on my own PC and not a live site. I am going to have a top navigation which includes

1. Home
2. About Us
3. Directions
4. Contact Us

On the revised left nav, I want to have the following

5.  Teams
6.  Social Events
7.  History
8.  Results

So far I have been able to create seperate top and left navigations.

If I use the following code

{menu template='simple_navigation.tpl' items='teams,social,...............,results'}

I can get the left navigation to show elements 5 - 8.

However this curtails the ability to add pages at a later stage i.e. gallery without actually having to go back in each time and add the page alias to the code above. I want to be able to have a start element and list all other elements underneath it. So if I use

{menu template='simple_navigation.tpl' start_element='5' show_root_siblings='1'}

Currently it lists all the active pages on the site i.e. elements (1-4). I have attempted this in my test environment but is this correct?

From the documentation I read the start_element should only show that element and it's children only. So even if I got this working, it won't show elements 6 - 8. Therefore will I have to edit the items code each time I add a new page to the left nav? Is there a way to start a navigation at a particular point and list every page underneath that point regardless of whether they are children or not of that initial start element?

Thanks
Aidan

Re: Menu Query

Posted: Mon Dec 03, 2007 12:26 pm
by cyberman
Change page structure to

1. Top menu (maybe as section header)
1.1. Home
1.2. About Us
1.3. Directions
1.4. Contact Us

and call it with

Code: Select all

{menu template='simple_navigation.tpl' start_level='2' start_element='1.1' show_root_siblings='1'}
and

2. Left menu
2.1.  Teams
2.2.  Social Events
2.3.  History
2.4.  Results

with

Code: Select all

{menu template='simple_navigation.tpl' start_level='2' start_element='2.1' show_root_siblings='1'}

Re: Menu Query

Posted: Tue Dec 04, 2007 8:32 am
by aidank
Hi Cyberman,

Thanks for the tip, I will try that now.

Regards,

Aidan