Active
Project:
Drupal core
Version:
main
Component:
menu.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
25 Feb 2015 at 18:49 UTC
Updated:
15 May 2026 at 00:15 UTC
Jump to comment: Most recent
People might want to render one menu with different markups. That might be necessary in scenarios where there is different styling for menu in mobile and desktop version. There is no theme suggestions to do this and it I didn't find way to add these suggestions in the theme_suggestions_alter so this is not achievable for themers.
If menu is rendered in a block create theme suggestions for a menu based on block.
-
-
-
Comments
Comment #1
lauriiiComment #2
lewisnymanIs this issue to make it possible to add template suggestions or to add template suggestions?
Comment #3
lauriiiI guess we need to do both to make it happen. I think we should have the theme suggestions there out-of-the-box because I'm pretty sure people are willing to theme their themes per block basis because now they have the possibility to print the block for multiple times.
Comment #4
star-szrSorry for the vague comment but I think blocks (or at least at the point of suggestion hooks, preprocess, etc.) are not aware of their instance in D8, so I have my doubts right now that this is technically feasible. Or in other words that a menu being printed in a block would have any better change of getting this information.
Don't let this hold you back but just a warning.
Comment #5
hass commentedWe need menu suggestions also with regions. Regions are most important as style of a menu may need to change per region. I had this requirement very very often and core is not flexible to solve this. Please also add region suggestion.
Comment #6
star-szr@hass I don't see that happening. See https://www.drupal.org/node/2011434
Comment #20
smustgrave commentedThank you for creating this issue to improve Drupal.
We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
Comment #21
smustgrave commentedWanted to bump this 1 more time.
Comment #23
smustgrave commentedCan actually see some value you in this looking at it for a third time. Not closing but will need test coverage