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.

Archive /

Our old forums are still available as a read-only archive.

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

<% If Middle %> in Menu control


Go to End


2 Posts   1891 Views

Avatar
bmatzner

Community Member, 1 Post

1 April 2008 at 12:42am

Hi,

I'd like to add separators between items of a menu control. So I was thinking of doing something like:

	<% control Menu(1) %>
	    ... link ...
	   <% if Middle %>
	      ... separator ...
	    <% end_if %>
	<% end_control %>

Obviously, this doesn't work. Would I need to build my own data source to emulate the menu with the Middle control?

Bernd

Avatar
Blackdog

Community Member, 156 Posts

2 April 2008 at 11:57pm

why not just use <% if Last %> to set the last item to not be followed by a seperator?