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.
I love that this module "just works" when you turn it on, but sometimes you want every menu item to have an associated image, that is not used in the menu - or maybe not used in the same way this module intends.
Use case: each section of your menu had a different header image, or each section of your menu loaded a different image int the sidebar.
I'm using this module for those kinds of purposes, so I'd like to be able to opt-out of including the style sheet that comes with the module, in favor of adding my own CSS to use the menu images in other places on my site.
Comment | File | Size | Author |
---|---|---|---|
#1 | allow_optional_css-1556294-1.patch | 1.51 KB | jenlampton |
Comments
Comment #1
jenlamptonHere's a patch that makes the css optional :)
Comment #2
hugovdberg CreditAttribution: hugovdberg commentedAnother option I would love to see, that is very much related to this request, would be a more advanced settings panel, using a structure something like this:
CSS template
Selector: [input type="text" value="a.menu-$mlid$, ul.links li.menu-$mlid$ a" /]
Path to template: [input type="text" value="sites/all/modules/menu_icons/menu_icons_css_item.tpl.php" /]
This way you can either use the CSS templating system as originally designed, or apply the default template to any item you wish. Also you can use a completely customized CSS, but still leverage the CSS generating system, or only use the generated menu link id's for whatever purpose you want (although I'm not sure if the module should still be called Menu Icons or Menu Markup would be a more fitting name ;-) ).
I would be willing to look into this matter, but only if there are enough people interested ;-)
Comment #3
acrollet CreditAttribution: acrollet commentedCommitted in http://drupalcode.org/project/menu_icons.git/commit/c90dc31, thanks for the contribution!
@hugovdberg: I think a separate module called Menu Markup would probably be the way to go for such an involved interface...