more than one menu?

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
toolman
Forum Members
Forum Members
Posts: 51
Joined: Wed Sep 12, 2007 5:10 pm

more than one menu?

Post by toolman »

Hi there,
Is it possible to have more than one menu, e.g a top menu and then another menu underneath it that I can apply pages to?

thanks
uniqu3

Re: more than one menu?

Post by uniqu3 »

Yes it is possible, it depends how you want to use the second menu, the best is you read help section of the MenuManager.

Some options:
{menu start_level='2'} this would show sublevels in the second menu
{menu includeprefix='alias1,alias2,alis3} would only show alias 1,2,3
{menu excludeprefix='alias1,alias2'} would hide alias1,2 and so on.
toolman
Forum Members
Forum Members
Posts: 51
Joined: Wed Sep 12, 2007 5:10 pm

Re: more than one menu?

Post by toolman »

Thanks for the reply. Is it possible to set up a menu so that I can apply pages to it in admin, rather than having to modify the code each time I add a page?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: more than one menu?

Post by Dr.CSS »

There is also a child of parameter, this will let you set a section header as not shown in menu then use this to show children of...

(optional) childrenof="" - This option will have the menu only display items that are descendants of the selected page id or alias. i.e: {menu childrenof=$page_alias} will only display the children of the current page.
toolman
Forum Members
Forum Members
Posts: 51
Joined: Wed Sep 12, 2007 5:10 pm

Re: more than one menu?

Post by toolman »

Thanks. I have tried this, but nothing is showing:

{menu childrenof=$services}
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: more than one menu?

Post by Dr.CSS »

When it says $page_alias that means it will get the page alias of the page it's on and show the children of it, if you want to show from the page alias "services" just use services w/o $...
toolman
Forum Members
Forum Members
Posts: 51
Joined: Wed Sep 12, 2007 5:10 pm

Re: more than one menu?

Post by toolman »

Thanks. I have it working, but I am trying to include a menu in a div that is a drop down.
However, the code I am using is replacing/renaming the main menu item.

This is my code:

[php]
alias}">
{if $node->alias == 'services'}


   
   
{menu childrenof=services-menu}
   
............
[/php]

Can anyone see a reason why this is not working?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: more than one menu?

Post by Dr.CSS »

Is this going to be just menu items that are children of services or children of whatever page you are on?...
owr_bgld

Re: more than one menu?

Post by owr_bgld »

toolman wrote: .......
{if $node->alias == 'services'}
.......
{menu childrenof=services-menu}
.......
do you see the difference?

Code: Select all

{menu childrenof="services"}
should work - and don't forget the ""
maranc
Forum Members
Forum Members
Posts: 249
Joined: Tue May 04, 2010 5:04 pm

Re: more than one menu?

Post by maranc »

User avatar
micahgodbolt
Forum Members
Forum Members
Posts: 149
Joined: Thu Jul 29, 2010 11:09 pm

Re: more than one menu?

Post by micahgodbolt »

{menu childrenof=$page_alias} is perfect! I was wondering how I could do this. I had in my mind an hour's worth of work creating a new menu in menu manager that started at 2nd level only.....THis is much easier.
Post Reply

Return to “Layout and Design (CSS & HTML)”