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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Template Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

'first' and 'last' class in navigatiion list


Go to End


3 Posts   3371 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, 1899 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!!