My themers ask me for first/last classes on things on a constant basis. primary/secondary links already have them, but other lists don't. Attached patch adds first/last classes to all theme_item_list lists as well as to all menu block lists. It's just extra hooks for themers to play with.

CommentFileSizeAuthor
#6 notices_9.patch642 byteswebernet
#2 firstlast_0.patch3.4 KBCrell
firstlast.patch4.07 KBCrell
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yched’s picture

Ooh yes, +1.
The parts that affect menu_local_tasks() seem unneeded ?

Crell’s picture

FileSize
3.4 KB

Indeed, that's because they are. :-) I had tried to add first/last there as well, but gave up because that function scares me.

yched’s picture

Status: Needs review » Reviewed & tested by the community

ready then...

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Good idea, good code, committed.

webernet’s picture

Status: Fixed » Needs work

This patch introduced the following notices on admin/build/modules

* notice: Undefined variable: items in /includes/menu.inc on line 596.
* notice: Undefined variable: items in /includes/menu.inc on line 597.
* warning: Invalid argument supplied for foreach() in /includes/menu.inc on line 597.

webernet’s picture

Status: Needs work » Needs review
FileSize
642 bytes
dvessel’s picture

Status: Needs review » Reviewed & tested by the community
Stefan Nagtegaal’s picture

Simple one-liner, RTBC!

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

That was quick, thanks, committed.

Anonymous’s picture

Status: Fixed » Closed (fixed)