Jump to:

3439 Posts in 1028 Topics by 869 members

Template Questions

SilverStripe Forums » Template Questions » hide some children on dynamic menu

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

Page: 1
Go to End
Author Topic: 2332 Views
  • pinkdigital
    Community Member
    7 Posts

    hide some children on dynamic menu Link to this post


    I have the following code which generates a dynamic menu using the children of all the pages.


    <% control MainMenu %>
    <li><a href="$Link">$MenuTitle.XML</a>

    <% if Children %>

    <ul class="submenu{$MenuCount}">
        <% control Children %>
       <li><a href="$Link" title="Go to the $Title.XML page">$MenuTitle</a></li>
        <% end_control %>
        <% end_if %>
    <% end_control %>   


    What I want to do is only show this on a couple of the MainMenu. Question is how can I achieve this. I have tried to use ChildrenOf without any success


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.