I have been looking for a way to implement adding an image icon to a menu listing. Just adding the icon in front of and keeping the menu text intact. Is there any chance this module is heading toward that functionality? I am using "taxonomy image" with my taxonomy nodes and listings. It works great. Now if only you could define images to be used with menu items. I'm not looking for background images, just inline icons to set beside the text. I've looked at the "sprite graphic menu" module, but it is for creating background images. Thanks for your efforts, the Drupal community is great! As long as I'm dreaming of new features, integration with imagecache to create sized images would be great! Thanks again, Dave

Comments

grendzy’s picture

You should be able to do this with CSS. Background images don't actually have to be "behind" or overlap the text.

Try something like this:

ul.menu_icons_menu .li {
  background-position: top left;
  padding-left 20px;
}
dabro’s picture

Thanks for the response! I am familiar with using css and background images, however I am interested in a solution that would give a UI for unskilled users to upload a menu icon image for each menu item. (example - the taxonomy image module). Allow resizing on the fly using "imachecache" and an easy to use interface. I'm trying to merge the functionality of "taxonomy image" and "sprite graphic menu" on my own but I'm not much of a coder, some success but I'm not quite there yet. This seems like a feature I would like to have but, maybe no-one else is interested. Thanks a bunch, Dave

skilip’s picture

Status: Active » Postponed (maintainer needs more info)

I really fancy the idea of imagecache integration! Inline block images would definately be possible however I think most users would prefer using css. So that should be optional.

grendzy’s picture

I considered inline's when I started this project... inlines have at least 2 things going for them:

  • you already have a background image (like a gradient), and you want an icon on top of that. (Though CSS3 will permit multiple backgrounds)
  • You've got a zillion images and inlines might be more efficient because you only need to add markup for the menu items on each page, whereas the CSS file contains properties for all menu items on your site.

If the need is just to make the icons look good, no matter what size the user uploads, then a fixed amount of padding + imagecache is definitely the way to go.

lejon’s picture

Version: » 6.x-2.0

Hi,

I can't seem to get the css to work. Should there be some kind of absolute position to keep the image away from the text? Or does the text have to be padded in some way?

Thanks

skilip’s picture

@grendzy Imagecache support is in now, are inline images still required?

grendzy’s picture

this can be "won't fix" I think... doesn't seem to be much need for it.

skilip’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Thanks