Jump to:

3401 Posts in 979 Topics by 855 members

Template Questions

SilverStripe Forums » Template Questions » nested menu, children has no items (ss1.4rc2)

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

Page: 1
Go to End
Author Topic: 1197 Views
  • poti
    Avatar
    Community Member
    3 Posts

    nested menu, children has no items (ss1.4rc2) Link to this post

    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.

  • poti
    Avatar
    Community Member
    3 Posts

    Re: nested menu, children has no items (ss1.4rc2) Link to this post

    .. oops. It was just a typo.

    1197 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.