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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Template Questions /

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

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


Go to End


2 Posts   1571 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.