I have Site_map 6.x-2.1 installed, and have installed the beta4 version of Menu Site Map. I've tried using both the default and the nested list display style in admin/settings/sitemap/menu_sitemap. My output is the same -- for example, in a menu called About Us, instead of:

About Us

Our Mission
People
etc

It displays:

Our Mission

People

etc
(without the "About Us" at all)

Thanks for any help,
AD

Comments

brankoc’s picture

Category: feature » bug

I can confirm this.

The menu_site_map_site_map() does load the menu data, but doesn't do anything with it.

It would be fairly simple to pass the menu title (and slug, and description) to the theming function for a menu tree, and should not break existing code. Just replace:

$output .= theme('menu_site_map_menu', $menu_tree, $max_depth);

in the menu_site_map_site_map() function by:

$output .= theme('menu_site_map_menu', $menu_tree, $max_depth, $menu);




The start of the theming function could then become:

function theme_menu_site_map_menu($menu_tree, $max_depth, $menu = NULL) {
                $output = ''; // MOVED UP!!!

                $title = isset($menu['title']) ? $menu['title'] : '';

                // http:/ /en.wikipedia.org/wiki/Slug_%28web_publishing%29
                $slug = isset($menu['menu_name']) ? $menu['menu_name'] : '';

                if ($title != '') {
                               $output .= "\n<h3 class=\"title title-$slug\">$title</h3>\n";
                }

This way at least those of us who speak a little PHP can access the menu titles.

brankoc’s picture

Example of how this could work: http://www.szosjaal.nl/sitemap .

(Perhaps not a very good example, but the customer wanted a fold-out sitemap here. Note that two of the headings have had display:none applied to them in the stylesheet.)

najibx’s picture

Category: bug » feature

Thanks brankoc, but I am getting blank sitemap page trying above. I did replace kennisportal_ with my theme name.

I believe this is standard request as, we want to group all menu, rather giving a long list. The nested, only works if the menu have second child.

brankoc’s picture

Category: bug » feature

Re: function name, you're right, I have fixed my sample code to now start with 'theme_'.

As for the function not working, I hope you noticed that I only posted the start of the function I was replacing.