Since D6 the menu tree i no more using class=tree. Please add this back... now it's "class=menu" and this causes some CSS inheritance and by this way troubles... :-(

Members fund testing for the Drupal project. Drupal Association Learn more


frjo’s picture

Status: Active » Postponed (maintainer needs more info)

Please clarify, or better yet make a patch :-).

hass’s picture

Status: Postponed (maintainer needs more info) » Active

In D5 the site_map module have created the sitemap tree with <ul class="tree">. Now in D6 it is generated with "class=menu" and this produce some troubles with normal Navigation. If Navigation looks *very* different to the site map tree, it is difficult to style this tree with CSS. I could write ~50 class overwrites or better we add the "tree" class back.

See as an example. The left Navigation is very different from the site map tree. With the current site_map D6 version the sitemap tree looks like the left Navigation menu, but should look like the old version.

poehnix’s picture

@ hass

I am playing with the sitemap module and looking and I have seen the sitemap at

There's a chance to know how were you able to show all the sitemap menus open (showing all their branches) even if they are closed in the menu?

To be more clear, your navigation menu is:

Template (closed, no children shown)
Tutorial (closed, no children shown)

while your sitemap looks like:

# Template Einführung

* Qualität
* Entwicklung
* Webserver
# Tutorials

* Drupal Bugs
* Modul - Node Style
* Modul - Panels

How is this possible if the expanded property is set to 0 ?



frjo’s picture

Version: master » 6.x-1.x-dev
Category: bug » feature

It's function theme_menu_tree() that sets this class and it's called from menu_tree_output(), the function site_map use to build the tree.

You can change the class via the theme function but that would change it for all menus.

I believe the best way is to add your own css that change only the site map page. Something like:

.site-map {
.site-map li {

frjo’s picture

Status: Active » Fixed
hass’s picture

Have you been able to add the UL class?

frjo’s picture

Status: Fixed » Closed (won't fix)

I still think my suggestion in#4 is the way to go.

I can not find any default styling in Drupal for the class "tree" so I guess what you really want is to replace class "menu" for menues with something else. For that I would need to stop using the Drupal function menu_tree_output() to build the menu tree and use a site map specific function instead. That will most likely not happen.

hass’s picture

#4 will not work as the styles are all inherited from the standard menu's and a sitemap tree looks *very* typically totally not like a site menu. In D5 this worked this way very well... and we haven't had any inheritance issues in D5.

hass’s picture

Title: menu tree does not use UL class=tree » Make menu tree use it's own sitemap-menu class
Status: Closed (won't fix) » Needs review
2.68 KB

Would you so kind to take a look to this patch, please? I do not like to maintain this myself and I'm pretty sure others will have the same CSS inheritance issues.

hass’s picture

Status: Needs review » Needs work

I'm going to re-role the patch as #187631: Patch to add list item theming is nearly the same request, but also requests to theme theme_menu_item.

hass’s picture

Status: Needs work » Needs review
3.39 KB

New patch with clean theme implementation.

frjo’s picture

Status: Needs review » Fixed

Thanks! Committed to the new 6--2 branch. All the new functionality will be put there.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.