CVS edit link for rc_100

I have developed several Drupal6 sites and have attended the week-long Lullabot workshop in Portland, Oregon in 2008. During that time I have learned how to write my own modules and custom Zen themes. At this point, I feel comfortable sharing some of the work that I've done with the community.

The first module that I would like to submit is extremely simple, but useful. The last few sites that I have worked on have used some form of the CSS Sprite technique for all front-end navigation elements, and I needed a way to differentiate between different menu elements with css rules. I could have used the menu_attributes module, but that would have required me to manually enter in class names for each menu item. Instead, I wrote a small module that uses a theme registry override to automatically add class names to the menu's <li> elements, based on the menu title (but with all non-alphanumeric, dash, and underscore characters replaced with dashes, and all letters converted to lowercase). It works great!

[Edited by KiamLaLuno to escape the HTML tag <li> that was rendered]

CommentFileSizeAuthor
#6 menu_css_names.tgz1.67 KBrc_100
#1 menu_css_names.tar_.gz1.4 KBrc_100

Comments

rc_100’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new1.4 KB
avpaderno’s picture

Status: Needs review » Needs work

Searching for CSS Sprites, I obtained a list of many modules; did you think of join forces with one of those projects?

rc_100’s picture

Yes, I did consider going that route, however, sometimes I just want to be able to add a css style to particular menu elements in the <ul> structure (and not others). Other times, I want to do CSS Sprites with the menu structure. So my thinking was that it would be good to have a more general-purpose module that allowed for either case, rather than limiting it to CSS Sprites.

[Edited by KiamLaLuno to show the hidden HTML tag added in the comment]

rc_100’s picture

Status: Needs work » Needs review
avpaderno’s picture

Status: Needs review » Needs work

The module should use Drupal Unicode functions.

rc_100’s picture

Status: Needs work » Needs review
StatusFileSize
new1.67 KB

Hello Kiam,
I've replaced the strlower() function with the drupal_strlower() unicode-compatible function - thanks for catching that.

avpaderno’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

avpaderno’s picture

Component: Miscellaneous » new project application
Assigned: Unassigned » avpaderno
Issue summary: View changes
Status: Closed (fixed) » Fixed

Status: Fixed » Closed (fixed)

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