Hello to all the themers out there, hopefully one of you can help me out.
I posted a forum issue a couple of days ago outlining the problem I've been having in Drupal 5 theming my menu. http://drupal.org/node/140654
So far I've gotten no responses, and I'm hoping someone here can help me out.
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.
The exact same piece of code accomplished exactly what I want in 4.7.
Has theming menus changed in some way I don't know about, or am I simply doing something wrong that just happened to work in 4.7.
Thanks in advance.
Mark
Have you looked for an answer in the handbook? I would bet the answer is in there.
http://drupal.org/handbook/customization
Regards, John
John Wilkins Albin.Net : friendly web development 480.598.3338 : http://www.albin.net
On May 3, 2007, at 7:59 AM, Mark Ferree wrote:
Hello to all the themers out there, hopefully one of you can help me out.
I posted a forum issue a couple of days ago outlining the problem I've been having in Drupal 5 theming my menu. http://drupal.org/ node/140654
So far I've gotten no responses, and I'm hoping someone here can help me out.
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.
The exact same piece of code accomplished exactly what I want in 4.7.
Has theming menus changed in some way I don't know about, or am I simply doing something wrong that just happened to work in 4.7.
Thanks in advance.
Mark _______________________________________________ themes mailing list themes@drupal.org http://lists.drupal.org/mailman/listinfo/themes
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.
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@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@drupal.org http://lists.drupal.org/mailman/listinfo/themes
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@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@drupal.org http://lists.drupal.org/mailman/listinfo/themes
Thanks for that link, it definitely gives me a much cleaner (and probably faster) way to strip my class and id from the sub-menu.
Through this problem, I have already learned more than ever wanted to about how Drupal's menu system works, and I just read its been completely rewritten for 6, cest la vie.
Unfortunately the class and id are still not being applied to the parent ul that contains my nested lists.
In 4.7 the same classes and ids were applied to every ul in the menu structure including the parent.
You mentioned that the menu system drops in and out of the theme system. Is it possible that as of version 5 template.php isn't called until after the parent list is themed by the core theme_menu_tree function? Doing a search of all of the core drupal files I couldn't find anywhere else the class "menu" was being applied except menu_tree. I haven't tried to modify menu.module yet, but I'll try today to see if that fixes my problem.
On 5/4/07, Larry Garfield larry@garfieldtech.com wrote:
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@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@drupal.org http://lists.drupal.org/mailman/listinfo/themes
-- Larry Garfield AIM: LOLG42 larry@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 _______________________________________________ themes mailing list themes@drupal.org http://lists.drupal.org/mailman/listinfo/themes
Update: Changing the theme_menu_tree function in menu.inc correctly applied the class and id to the parent as well as the children. I guess its time to go report a bug.
On 5/4/07, Larry Garfield larry@garfieldtech.com wrote:
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@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@drupal.org http://lists.drupal.org/mailman/listinfo/themes
-- Larry Garfield AIM: LOLG42 larry@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 _______________________________________________ themes mailing list themes@drupal.org http://lists.drupal.org/mailman/listinfo/themes