[support] menu not appearing expanded

Metzler, David metzlerd at evergreen.edu
Wed Aug 15 16:07:56 UTC 2007


Yes and no. 

Your initial assumption is correct.  Primary links and secondary links
are completely unrelated structures.  Not all themes support the concept
of secondary links.  Frankly not all themes support the concept of
primary links either.  The only difference between the a primary link
and a normal menu block comes at the theme layer.  Most themes disable
the expanding/collapsing behaviour of primary links because they want to
display it inline (across the page).  The expand/collapse model doesn't
really hold up because the default css/javascript for this just behavior
just doesn't work in a horizontal layout (especially in I.E.). 

Primary links and Secondary links when they are supported by a theme,
most often only work properly if they are a single simple list (i.e.
non-hierarchical).  That being said, there are some themes that may be
designed to display hierarchical list primary links in a nice fashion.
That is completely up to the theme designer.  

So if you find a theme that supports secondary links, you'll be able to
add a simple list of secondary lists that will probably appear in the
site header, in a smaller font than the primary links, perhaps with text
decorations turned on.  That's just a theme developers choice.

Depending on your theme, you may be able to alter it to actually allow
the expanding collapsing behaviour, but if you'd like different expand
collapse behaviour, my recommendation would be to create a new region in
your theme for the menu item, and add the css that you want to display
that region differently.   You'll problably end up fighting the base css
less by using this strategy, but you'll need to learn enough theming to
add the new region. 

I hope that clarifies things for you.... Or maybe I've just confused you
more :). 

Dave                                              

-----Original Message-----
From: support-bounces at drupal.org [mailto:support-bounces at drupal.org] On
Behalf Of Sarah Adams
Sent: Wednesday, August 15, 2007 8:40 AM
To: support at drupal.org
Subject: Re: [support] menu not appearing expanded

>>>>>> I just created a new page on my site, and added a menu item to 
>>>>>> link to it. I set the menu item as the child of a previously 
>>>>>> added menu item, but the new item does not appear below the 
>>>>>> parent when I click on the parent. I thought maybe this means I 
>>>>>> need to force the parent item to be expanded, but even then the
sub-item never appears.
>>>>>>
>>>>>> I'm not sure if I'm just doing something wrong, or if I've 
>>>>>> misunderstood how menu items should behave. Any tips appreciated!
> 
> Actually I'd try this in a non-primary links menu.  Some themes go to 
> the trouble of treating primary links differently, and Intentionally 
> making them not expand.  Try performing the same tasks with either a 
> newly created menu, or in the navigation menu.  Do they work there?  
> If so, make a new menu and enable the block in your theme rather than 
> using them as primary links.

AHA! I finally got this to work. I just removed the following from my
theme:
print theme('links', $primary_links, array('class' =>'links', 'id' =>
'navlist'))
and instead added the menu to the appropriate block.

Your reply set me on the right track. Thanks!

I also decided to do a little experiment to see if maybe I was not quite
understanding the concept of primary/secondary links. I went to
www.opensourcecms.com and used their demo of drupal. My understanding
was that the primary links and secondary links were not related, that I
could just place whichever menu items I wanted in each of those menus.
But my experiment in the drupal demo showed me that if I added a menu
item to the primary links, then added a child item also to the primary
links, the child item would in fact appear under the secondary links. So
I guess in reality, I should never explicitly add items to the secondary
links menu - am I understanding this correctly now?

--
sarah adams
web developer & programmer
portfolio: http://sarah.designshift.com
blog: http://hardedge.ca
--
[ Drupal support list | http://lists.drupal.org/ ]


More information about the support mailing list