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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

$sort skipped 2


Go to End


564 Views

Avatar
Xazen

Community Member, 18 Posts

3 November 2011 at 10:37am

Hello,

I have got some simple lines of code:

<% control Menu(1) %>
<li class="$LinkingMode $Sort"><a href="$Link" title="Go to the &quot;{$Title}&quot; page">$MenuTitle</a></li>
<% end_control %>

Since every link should have another background I added $Sort to get more control through CSS. But the $Sort variable skipped "2".
For example:

root
-home
-news
-media
-contact

$sort returns:
home: 1
news: 3
media: 4
contact: 5

I remember there was another link between home and news, which I deleted. I think that might be the problem. Is there a way to fix it ? I need another fixed classname.

Thanks in advance!