Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | site_map_hidden_menus-1331104.patch | 1.21 KB | zhuber |
Comments
Comment #1
zhuber CreditAttribution: zhuber commentedComment #2
zhuber CreditAttribution: zhuber commentedComment #3
darrell_ulm CreditAttribution: darrell_ulm commentedPatch 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?
Comment #4
darrell_ulm CreditAttribution: darrell_ulm commentedThis 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.
Comment #5
frjo CreditAttribution: frjo commentedPlease commit to 7-dev darrellulm and mark as fixed.
Comment #6
darrell_ulm CreditAttribution: darrell_ulm commentedfrjo,
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!
Comment #7
frjo CreditAttribution: frjo commentedYou 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.
Comment #8
darrell_ulm CreditAttribution: darrell_ulm commented@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.
Comment #9
darrell_ulm CreditAttribution: darrell_ulm commentedOK, the changes are merged back in.
Cheers,
Comment #10
darrell_ulm CreditAttribution: darrell_ulm commentedThis is included in 7.x-1.x-dev