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

nested menu, children has no items (ss1.4rc2)


Go to End


2 Posts   1780 Views

Avatar
poti

Community Member, 3 Posts

4 May 2010 at 11:56pm

Hello.

This is probably obvious to most of you:

I am trying to build a nested menu with -- currently -- two levels. Though there are several children for a first level entry (and "if Children" returns true) those children are not iterated over. "control Childen" is executed only once with $Link and $MenuTitle being empty.

Any Idea?

	<% control Menu(1) %>
	<li><a href="$Link">$MenuTitle</a></li>
		<% if Children %> 
		<li><ul class="MenuSecond"> 
		<% control Childen %>
			<li><a href="$Link">$MenuTitle</a></li>
		<% end_control %>
		</ul></li>
		<% end_if %>
	<% end_control %>

Thanks a lot for taking a look.

Avatar
poti

Community Member, 3 Posts

5 May 2010 at 7:05am

.. oops. It was just a typo.