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.
Hello,
There is no option for controlling the views menu items visibility by role like on regular menu items. I can setup visibility rules on the view itself but the submenu is still generated (still having #below key on menu item parent even with empty view).
I guess the simplest would be to keep the regular visibility rules tab, but i cannot find where that part of the form is altered. When i dpm() the $form object in _menu_views_form_alter (menu_views.admin.inc, l. 141), the "visibility" key still exists so it should appear on the form...
Anyone ?
Thanks,
Eric
Comment | File | Size | Author |
---|---|---|---|
#3 | no-visibility-options-2618878-10584588.patch | 1.35 KB | EricRondo |
Comments
Comment #2
EricRondo CreditAttribution: EricRondo commentedComment #3
EricRondo CreditAttribution: EricRondo commentedGot it ! Here's a working patch.
Comment #4
Sagar Ramgade CreditAttribution: Sagar Ramgade as a volunteer commentedComment #5
markhalliwellVisibility/access should be set restricted on the view itself, not the menu item.
Comment #6
EricRondo CreditAttribution: EricRondo commented@markcarver: as I said, even with en empty view, the #below key is still added to the parent menu item (if in a submenu) so the theme builds markup for it. For example, bootstrap adds a caret & dropdown if #below key exists, even if there is no "real" content in it...
Comment #7
markhalliwellThen that's an issue with the theme, not this module (which works as designed). I'd also like to further mention that this module is no longer my focus and is not really supported anymore (as indicated on the project page).