[Solved] make second level menu permanent

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
newagekat
Forum Members
Forum Members
Posts: 161
Joined: Mon Feb 06, 2006 6:06 pm

[Solved] make second level menu permanent

Post by newagekat »

Hi:

I'm using cms v1.3.1 Havana.  Love this software and though this is overdue on my part, you guys rock big time.

I'm working on a site that will present categories of lyrics.  Each category will list the songs available.  the category list should be set to collapse 1 and expand only when clicked.  I know this is already a feature.  Here's the rub:  this particular project requires the use of a main menu (only 1 level at this time) on all pages.  this is currently being handled with {menu template='simple_navigation.tpl' number_of_levels='1'},  and the sub menu (categories) to be permanently visible on all pages regardless of where the user might be on the site.  Currently, this is {menu template='simple_navigation.tpl' start_level='2' collapse='1'}

I did duplicate the css for simple_navigation.tpl and changed the wrapping div tag, but I cannot change the behavior of the sub menu.  Will I need to create a separate main menu?  is this possible without without affecting the current main menu?

I hope my explanation is clear, sometimes I can't see the forest for the trees ;)

the site can be viewed here http://obadiahlyrics.com/index.php

If you navigate to lyrics, I have the sub menu showing, though not yet pretty, but I want this specific submenu to be a permanent fixture on all pages.

Is this possible?

Any help much appreciated.
Last edited by Anonymous on Sat Aug 02, 2008 1:49 pm, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: make second level menu permanent

Post by Dr.CSS »

You can call them with start_page="alias of first page" show_root_siblings="1"...

Start_level="2" will start it at the second level of which ever top level your on...
newagekat
Forum Members
Forum Members
Posts: 161
Joined: Mon Feb 06, 2006 6:06 pm

Re: make second level menu permanent

Post by newagekat »

mark wrote: You can call them with start_page="alias of first page" show_root_siblings="1"...

Start_level="2" will start it at the second level of which ever top level your on...
Hey Mark:

Thanks for the reply.  I was just reading the documentation on Nodes and got seriously confused.  So I did what you said and I now have the list I wanted.  Last question.  you'll notice the word Lyrics shows up again just above the category list (level 2 menu), how do I get rid of this second active parent? without affecting the top level menu?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: make second level menu permanent

Post by Dr.CSS »

What do your menu tags look like, where, top, side...

The page alias would have been blue...
newagekat
Forum Members
Forum Members
Posts: 161
Joined: Mon Feb 06, 2006 6:06 pm

Re: make second level menu permanent

Post by newagekat »

i don't thinks the page alias is blue.  If I do that then it only shows Blue as a submenu.  My current code is: {menu template='simple_navigation.tpl' start_page="lyrics" show_root_siblings="2" number_of_levels="2" start_level="2"}.  here,  the  menu shows up great on all pages, except on the lyrics page.  on this page the menu lyrics shows up a second time.  i'm stumped.  see attachment:
Attachments
level2b.jpg
level2a.jpg
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: make second level menu permanent

Post by Dr.CSS »

{menu template='simple_navigation.tpl' start_page="blue" show_root_siblings="1"}

show_root_siblings="1"  The 1 means yes, 0 means no, 2 means nothing...
newagekat
Forum Members
Forum Members
Posts: 161
Joined: Mon Feb 06, 2006 6:06 pm

Re: make second level menu permanent

Post by newagekat »

Hey Mark, would it be ok if we spoke or IM, I don't want to take up space in the Forum.  I don't mind shoring the result, but the back and forth can be too much.  Let me know.

in the meantime, i did what your said and got a very different result. 

I think I have a solution.  in the css for the categories, i gave the top level link and top level h3 white bg and white text.  it's not pretty, but it works.
Attachments
level2c.jpg
newagekat
Forum Members
Forum Members
Posts: 161
Joined: Mon Feb 06, 2006 6:06 pm

Re: make second level menu permanent [SOLVED]

Post by newagekat »

Mark, it worked.  You were right, I was wrong.  Here's the solutions.  To display only the children of a specific parent menu, place this tag where you want it to show.  Replace "blue" with the alias of the first child item.  Number of levels 1 will only show those children on the same level.

{* NB! The below is only added because several default templates use the same menu stylesheet, to "force" the subnavigation to act as if it's the second level in a list *}
{menu template='simple_navigation.tpl' start_page="blue" show_root_siblings="1"  number_of_levels="1"}

I had accidentally removed the which is why things were starting get scary.

thanks for your help Mark.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: make second level menu permanent

Post by Dr.CSS »

[solved] in first post...
christiaans
Power Poster
Power Poster
Posts: 300
Joined: Tue Mar 04, 2008 10:37 am

Re: make second level menu permanent

Post by christiaans »

mark wrote: [solved] in first post...
Your wish is my command. :)
Post Reply

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