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.

CommentFileSizeAuthor
#1 allow_optional_css-1556294-1.patch1.51 KBjenlampton
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jenlampton’s picture

Version: 7.x-3.0-beta3 » 7.x-3.x-dev
Status: Active » Needs review
FileSize
1.51 KB

Here's a patch that makes the css optional :)

hugovdberg’s picture

Another 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

  • Default — Use default CSS template
  • Advanced selector — Provide your own CSS to which default template should be applied, $mlid$ will be replaced by unique menu link id.

    Selector: [input type="text" value="a.menu-$mlid$, ul.links li.menu-$mlid$ a" /]
  • Custom template — Provide your own CSS template for Menu Icons
    Path to template: [input type="text" value="sites/all/modules/menu_icons/menu_icons_css_item.tpl.php" /]
  • None — Use your own CSS to manually apply styles to links

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 ;-)

acrollet’s picture

Status: Needs review » Fixed

Committed 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...

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.