Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Template Questions

'first' and 'last' class in navigatiion list


Reply

3 Posts   1264 Views

Avatar
thepurpleblob

2 March 2011 at 11:41pm Community Member, 28 Posts

I am creating a navigation list but I want classes applied to the first and last items in the list ('first' and 'last' will do) as they will be styled slightly differently.

Is there an easy way to do that?

Avatar
swaiba

3 March 2011 at 1:02am Forum Moderator, 1796 Posts

These are all page controls...

$First
$Last
$FirstLast

(for more info... http://doc.silverstripe.org/sapphire/en/reference/built-in-page-controls)

Avatar
thepurpleblob

3 March 2011 at 1:19am Community Member, 28 Posts

Ahh.... missed those completely. Thanks!!