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.
From: #1817622-5: Upgrading from 1 to 2 destroyed existing menu items
... we need the ability to add classes to the
<li/>
element? I've have been thinking about wrapping the entire view (and view title if it exists) with something like:<div class="menu-view"></div>
. Perhaps, however, classes should just be added to the<li/>
element instead. I agree that some type of this functionality is definitely needed.
@todo: Create a separate issue once this one is finished to provide support for Superfish. Given the lack of theme hooks in Superfish module, this feature might be difficult to implement.
Comment | File | Size | Author |
---|---|---|---|
#4 | add-classes-to-menu-views-item-li-element-1824588-4.patch | 554 bytes | philipz |
Comments
Comment #1
nathanshubert CreditAttribution: nathanshubert commentedCould this feature just be unavailable to Superfish at first?
Comment #2
ahimsauziI second that. Having a module be dependent on another is madness!
Would it be possible to add a menu class to menu_views_menu_link that identifies its menu items as a menu_views item? Given that the biggest use case for this module is creating mega menus, having its menu item identify beyond the default leaf will be very helpful.
Thanks,
Uzi
Comment #3
markhalliwellDependent?? Where do y'all get that from? The
@todo
is merely a note for something "to-do". Granted how I worded it probably doesn't point the right picture, but these issue queues are a place for us to keep our notes. When I start actually coding this feature, I just didn't want to forget about support for Superfish. In all reality, a supplemental issue will probably be created just for Superfish additions for this feature.Comment #3.0
markhalliwellAdded quote
Comment #4
philipz CreditAttribution: philipz commentedA simple patch to add
'menu-view'
class to menu views<li>
tags. You probably want to add more precise classes based on view id or name but that's a start and something I needed in my project.Comment #5
markhalliwellAdded in the release of 7.x-2.1 (http://drupal.org/node/1909888)
Comment #6.0
(not verified) CreditAttribution: commentedUpdated @todo.