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.
Hey, Jen! You've created a wonderful module, thank you for it!
But menu also displays on /admin* pages and works not correctly (see screenshot).
I think that mobile menu should displays only on default theme. Patch below. Review please
Comment | File | Size | Author |
---|---|---|---|
#4 | mmenu-hide-on-admin-paths-2219277-4.patch | 456 bytes | joelstein |
#1 | mmenu-menu_on_admin_pages-2219277-1.patch | 1.82 KB | alexander_danilenko |
2014-03-17_110609.png | 8.75 KB | alexander_danilenko |
Comments
Comment #1
alexander_danilenko CreditAttribution: alexander_danilenko commentedComment #2
webadpro CreditAttribution: webadpro commentedI think the following issue would fix your problem.
https://drupal.org/node/2261067
Comment #3
joelstein CreditAttribution: joelstein commentedHere's another solution. Add this to a custom module:
Note that it's hook_mmenus_alter(), not hook_mmenu_alter(). The documentation in mmenu.api.php doesn't match the code, in this case.
Comment #4
joelstein CreditAttribution: joelstein commentedNevermind, my comment in #3 won't work. Here's a simpler patch which bypasses mmenu on admin paths.
Comment #5
webadpro CreditAttribution: webadpro commentedI actually think if #2 would be commited would fix all these issues.
Comment #6
Jay.Chen CreditAttribution: Jay.Chen commentedThanks danilenko_dn and joelstein. The hook has been corrected to hook_mmenu_alter on the version 7.x-2.0.
So, now you can disable the mmenu on the admin page like this:
For more info, please read: https://www.drupal.org/node/2324139
Comment #8
couloir007 CreditAttribution: couloir007 commentedWith AMP, it would be nice to control which theme the mobile menu is inserted to. This does the trick for me.