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.
The patch is designed to for use if the user does not need to create a new submenu.
Comment | File | Size | Author |
---|---|---|---|
#15 | menu_position-2107963-7-patch-does-not-save-to-database-fiexd.patch | 5.24 KB | a65162 |
#12 | menu_position_patch-features.patch | 859 bytes | ayalon |
#7 | menu_position-2107963-7.patch | 4.55 KB | sheise |
voys-hide_child_menu-158.patch | 960 bytes | Pepelatz |
Comments
Comment #1
skalfyfan CreditAttribution: skalfyfan commentedYou can just as easily just use css to hide the generated submenu using display: none.
Comment #2
ayalon CreditAttribution: ayalon commentedThanks for the patch! This should be an option of this module. Disabling the Menu Item via patch is bad but the only solution.
Comment #3
ayalon CreditAttribution: ayalon commentedCSS is not an option because the menu item is useless and should not be rendered
Comment #4
keva CreditAttribution: keva commentedThank you for this patch.
Comment #5
Agogo CreditAttribution: Agogo commentedThis really needs to be an option if not default so one do not have to hack the code to be able to turn of the menu items that shouldnt exist in the first place.
Comment #6
punyaruchal CreditAttribution: punyaruchal commentedThanks its work nice.
Comment #7
sheise CreditAttribution: sheise commentedHere's a patch to do this more properly with an added option to each rule to display or not.
Comment #8
antims CreditAttribution: antims commentedPerfect.Thans you,@sheise.
Comment #9
sheise CreditAttribution: sheise commentedHoping to get more reviews of #7.
Comment #10
BarisW CreditAttribution: BarisW at LimoenGroen commentedIs this related to #2620132: Menu position does not respect "expanded" setting?
Did you check the settings at /admin/structure/menu-position/settings?
Comment #11
sheise CreditAttribution: sheise commented@BarisW
Wow you are right - this can be easily done at admin/structure/menu-position/settings. How did we all miss those settings??!!
I guess this patch would still be applicable if you wanted to have some menu rules show the active link and other rules not show it. But that might be rare that people would want to have both on the same site.
Comment #12
ayalon CreditAttribution: ayalon commentedThis feature is much needed. I update the patch for the latest dev and I added also the features export functionality which is missing in the patch
Comment #13
BarisW CreditAttribution: BarisW at LimoenGroen commented@ayalon; please don't mix issues. The patch you added is already committed to dev in #2640076: Menu position rule in features export causes PDOException during feature revert.
Comment #14
a65162 CreditAttribution: a65162 commentedComment #15
a65162 CreditAttribution: a65162 commentedThis patch work for me.
note:when you export menu position setting, then you revert it. maybe you will see some error.
like this :
This meaning is menu postition create the menu link that conflict with other menu link (
mlid
!!!!!);
solved : modify your feature componect.