I am currently using the site map module on a website that has many disabled menu items. The menu items are not meant to be displayed in the actual main menu navigation, but their parent link(s) are. I have disabled menu items is to ensure that when you are on any of these nodes/pages you can have the navigation style the parent link as active/selected. This shows the users what section of the site they are in when viewing a detail page. That being said, we still want those links to show up in the sitemap.

I can see a lot of people needing this same feature, so I am going to post a patch here.

CommentFileSizeAuthor
#1 site_map_hidden_menus-1331104.patch1.21 KBzhuber
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

zhuber’s picture

Status: Active » Needs review
FileSize
1.21 KB
zhuber’s picture

Status: Needs review » Patch (to be ported)
darrell_ulm’s picture

Status: Patch (to be ported) » Reviewed & tested by the community

Patch applies and works. On question is:
|| variable_get('site_map_show_menus_hidden', 0)
This looks like it will just include everything, wondering if any possibilties of side effects. This increases the number of links greatly and dumps everything. It still handles permissions correctly for users, i.e. the user has to still have access.

If frjo is OK with it, it can be pushed. The code looks OK to me.

frjo, what do you think?

darrell_ulm’s picture

Assigned: zhuber » darrell_ulm

This was worked into the new 7.x-2.x-alpha version on GIT
http://drupal.org/project/site_map/git-instructions

When the 7.x-2.x version is well tested with other fixes and features, we'll push out an official 7.x-2.x release.

frjo’s picture

Please commit to 7-dev darrellulm and mark as fixed.

darrell_ulm’s picture

frjo,
OK, can do this. Question, may I push everything I have in alpha currently. This patch is included plus other enhancements because then sitemap can be extended by passing options.

Also, which git version is used for the 7.x-dev release?

Thank you!

frjo’s picture

You can merge in 7.x-2.x-alpha to 7.x-1.x.

$ git branch -a

gives you all branches so you can have a look.

This all look like minor changes so I don't believe a 7.x-2.x is warranted.

darrell_ulm’s picture

@frjo, Thanks, sounds good. Most things seem to be working, however I would like to test a little more before the push since we have so many users. I am going for a mid-week push on this optimally.

darrell_ulm’s picture

OK, the changes are merged back in.

Cheers,

darrell_ulm’s picture

Status: Reviewed & tested by the community » Fixed

This is included in 7.x-1.x-dev

Status: Fixed » Closed (fixed)

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