Page 1 of 1

Dual menu issue - Solved

Posted: Sat Oct 27, 2007 4:52 pm
by aidank
Hi Guys,

I have been trying to add vertical and horizontal menus to a template. I just started with the standard "Top simple navigation + left subnavigation + 1 column" template and I began editing it.

I have 10 pages in my site and I want the first 5 displayed on the top horizontal nav and the other 5 running down the left hand nav. I looked at the Menu Manager help guide and found the some helpful information however I still can't get the child links of the main elements to display on the left nav.

Here is my code for the horizontal part

   
      Navigation
      {menu template='simple_navigation.tpl' items='elementname1,elementname2,elementname3,elementname4,elementname5' number_of_levels='1'}
     
   

I have tried all different combinations for the vertical part but to no avail. Here are different combinations
1.  {menu template='simple_navigation.tpl'  start_element='6.0'}
2. {menu template='simple_navigation.tpl' items='elementname6,elementname7 etc' collapse='1' number_of_levels='2'}

I hope it is just something smaller but element 6 & 7 have children links but I can't get them to display on the left vertical nav when I select them. So for example element 6 is called About us and it has a sub-link called history. I can see the "About Us" link but when I click on it the sub menu including history is not displayed.

Also the start_element code isn't working at all in the way I have above.

Any help much appreciated

Aidan

Re: Dual menu issue

Posted: Sat Oct 27, 2007 7:15 pm
by Dr.CSS
If all 5 top items are first level menu items than just call with...

      {menu template='simple_navigation.tpl' number_of_levels='1'}

And side menu...

{menu template='simple_navigation.tpl' start_level="2" }

(optional) start_level="2" - This option will have the menu only display items starting a the given level. An easy example would be if you had one menu on the page with number_of_levels='1'. Then as a second menu, you have start_level='2'. Now, your second menu will show items based on what is selected in the first menu.

Re: Dual menu issue

Posted: Sat Oct 27, 2007 8:02 pm
by aidank
Hi Mark,

Thanks for the help.

However no the 5 top and side menus are all first level menus. I think the standard "Top simple navigation + left subnavigation + 1 column" template serves the purposes you have outlined. I need the left nav to display first level menus and their children. I can get the left vertical navigation to show these first level menus but not their children.

I not sure if I am confusing the matter but you posted info below on the start_level parameter, I have read through these options in the menu manager help guide, I was enquiring in my original post about the start_element parameter. It doesn't seem to be working when I use the following code:

{menu template='simple_navigation.tpl'  start_element='6.0'}

If you can offer any further help on the two queries, I really appreciate it.

Aidan

Re: Dual menu issue

Posted: Sat Oct 27, 2007 8:04 pm
by calguy1000
start_element takes a page id, or a page alias (page aliases don't change when you adjust the hierarchy, page id's may.... they don't take hierarchy positions.

Re: Dual menu issue

Posted: Sat Oct 27, 2007 11:52 pm
by Dr.CSS
The start element parameter will only show it's children not the items below it on the same level...

Use the top menu tag as is but you can take out the number***='1', listing the items will not allow any other menu items to be shown...

For the side menu set the pages under a section header not shown in the menu and then call your page ie,.  start_element='6.1' show_root_siblings='1' and collapse='1'...

If you don't set them under a 'not shown section header' then the show_root_siblings will show 1...5 also, if 6..10 have children using the items= parameter will only show what you list and not child pages...

And yes page alias is good if you add more pages above 6 or delete one, it will go up/ a number for each added/deleted page...

Re: Dual menu issue

Posted: Sun Oct 28, 2007 4:10 pm
by aidank
Hi Guys,

I changed my code to:

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

It seems to have done the trick.

Thanks

Aidan