[themes] Overriding menu_tree

Larry Garfield larry at garfieldtech.com
Fri May 4 05:26:19 UTC 2007


Have a look here: http://drupal.org/node/138656

I was tackling a different issue there, but the structure for what you want is 
probably the same.  Be sure to see the descriptive text to explain what's 
going on.  Menu theming is a bit weird in that it jumps in and out of the 
theme system proper, but you can pull it all into the theme system that way.

On Thursday 03 May 2007, Mark Ferree wrote:
> Drupal by default uses the theme_menu_tree function to apply the class
> "menu" to all menus throughout the site (except for primary and secondary
> menus which use a different function).  When I did an override of the menu
> in 4.7 the parent menu as well as the sub menus were changed, but as of
> version 5 the only class that is changed is the class on the sub-menus.
>
> I have been through the theme handbook several times, as well as searching
> the forums and the archives of this list for anyone having similar issues.
> I have a feeling that changing the class isn't something that is done very
> often, due to the fact that you can easily modify your css to hook into the
> correct "menu" class, unfortunately the javascript menu I am using (udm)
> isn't as flexible.
>
> On 5/3/07, Jason Flatt <drupal at oadaeh.net> wrote:
> > On Thursday May 3 2007 7:59 am, Mark Ferree wrote:
> > > Two days later, and I still am only able to override the class and ids
> >
> > of
> >
> > > the nested sub menus on my site, and not the top level.
> >
> > You might try using Firebug's inspect feature in Firefox to determine if
> > you
> > are overriding the correct classes and/or ids.
> >
> > --
> > Jason Flatt
> > http://www.oadaeh.net/
> > Father of Six:  http://www.flattfamily.com/ (Joseph, 13; Cramer, 11;
> > Travis,
> > 9; Angela; Harry, 5; and William, 12:04 am, 12-29-2005)
> > Linux User:     http://www.kubuntu.org/
> > Drupal Fanatic: http://drupal.org/
> > _______________________________________________
> > themes mailing list
> > themes at drupal.org
> > http://lists.drupal.org/mailman/listinfo/themes


-- 
Larry Garfield			AIM: LOLG42
larry at garfieldtech.com		ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson


More information about the themes mailing list