Sprite Graphic Menu

hanoii - December 25, 2008 - 21:21

This module lets you upload a sprite image for a menu item and, with the use of CSS, configure different sprites of the image for different states of the link (normal, visited, hover and active).

Drupal 6.x Notes (for theme developers)

Due to the new menu system in 6.x no theme overrides are necessary. However, be aware that this module sets styles for each link using classes, and, if those links are also reached by some other more selective CSS rules, those may take precedence. That's the case for primary links in the default Garland theme.

To help avoid this and let this module work OK with any theme, there's an entry to add other CSS selector rules to be combined with the link rules. This can be set in "Administer" -> "Site building" -> "Menus" -> "Settings" in the Sprite Graphic Menu settings fieldset. The default is set to work properly with the Garland theme.

Drupal 5.x Notes

This module overrides two phptemplate functions (phptemplate_menu_item_link() and phptemplate_links()). If you are planning on installing this module on a theme that overides those functions as well, you'll need to rename them to phptemplate_spritemenu_menu_item_link() and phptemplate_spritemenu_links(). If you do this, you will also need to modify your theme code so they include proper IDs on the links for the CSS of this module to work properly.

Please refer to the code and look for theme_spritemenu_menu_item_link() and theme_spritemenu_links() for ideas on how to do it.

You will receive an install error if the module finds these function on your theme and it won't let you install the module until you rename them.

If at any moment, you decide to disable this module, rename back your overrides
to the proper names.

Sponsored by:
Infomagnet

Releases

Official releasesDateSizeLinksStatus
6.x-1.02009-Jun-179.6 KBRecommended for 6.xThis is currently the recommended release for 6.x.
5.x-1.02008-Dec-2510.24 KBRecommended for 5.xThis is currently the recommended release for 5.x.


 
 

Drupal is a registered trademark of Dries Buytaert.