Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
menu system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
7 Mar 2009 at 00:38 UTC
Updated:
3 Jan 2014 at 00:07 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mr.baileysRan into the same issue today. I'd classify this as a bug. If a menu item is the first, it should have the class "first", if it's the last item it should have a class "last", and if it's the only item, it should have both classes.
Current practice is to fix this in 7.x-dev first though, and then backport it to D6.
Not sure about:
Feels a bit messy since $extra_class might be NULL and the space is only required in very specific circumstances (single-item menu) anyway. What about treating $extra_class as an array:
Comment #2
ao2 commentedYes that will work as well, or if we want to use the same style used in theme_item_list, we could do:
Regards,
Antonio
Comment #3
mr.baileysThat looks cleaner than my solution. Would you mind rolling a new patch?
Comment #4
ao2 commentedOk,
I rebased the code above to apply cleanly on drupal7, the patch still applies to drupal6 tho.
Regards,
Antonio
Comment #6
ao2 commentedMmh, the System Message says ...
I guess it's because the patch I sent was made with quilt which put also the parent directories in paths (which, in general, is good IMHO), let's try with a 'p0' patch as it expects.
Regards,
Antonio
Comment #7
andypostanother great patch, tested and this works as expected ... now theme can check for this case.
RTBC
Comment #8
dries commentedWe usually add the classes to an array, and than we simply explode them. Sounds like it would be more elegant. One more re-roll?
Do we have tests for this, or do we feel that is unnecessary?
Comment #9
andypostSuppose better reroll to unify :)
I see nothing to test...
Comment #10
dries commentedCommitted to CVS HEAD! Moving version number. Thanks Andy.
Comment #11
andypostSo here reroll for d6
Comment #12
ao2 commentedHi, will this be added to D6 as well?
Thanks,
Antonio
Comment #13
andypostIf anyone review this - patch still applies cleanly
So add a tag
Comment #14
hefox commentedPatch works for me. :)
Comment #15
pvasili commented#11 - good patch
Please use it for 6 versions!
Comment #16
ao2 commentedPing.
Can we have this in next Drupal6 release?
Thanks,
Antonio
Comment #17
andypostThere are more then 2 people test this so suppose RTBC
Comment #18
gábor hojtsyGreat, committed to Drupal 6 too, thanks.