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   1316 Views

Avatar
thepurpleblob

Community Member, 28 Posts

2 March 2011 at 11:41pm

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

Forum Moderator, 1805 Posts

3 March 2011 at 1:02am

These are all page controls...

$First
$Last
$FirstLast

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

Avatar
thepurpleblob

Community Member, 28 Posts

3 March 2011 at 1:19am

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