316 Posts in 85 Topics by 151 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1874 Views |
-
How to set up Sub-sub-menu to my site??

18 August 2009 at 3:09am Last edited: 18 August 2009 3:10am
Hello everyone,
i was asking myself how to implement a sub-sub-menu to my site. I am quite new to silverstripe and don't know how to do that.
This is how the actual sub-menu is looking:
<% if Menu(2) %>
<div id="Menu2Top">
<% control Level(1) %>
<h2><a href="$Link">$Title</a></h2>
<% end_control %>
</div>
<ul id="Menu2">
<% control Menu(2) %>
<li class="$LinkingMode"><a href="$Link" title="$Title">$MenuTitle</a></li>
<% end_control %>
</ul>
<% end_if %>What do i need to do?
I tried this one here, but didn't work out:
<% if Menu(2) %>
<div id="Menu2Top">
<% control Level(1) %>
<h2><a href="$Link">$Title</a></h2>
<% end_control %>
</div>
<ul id="Menu2">
<% control Menu(2) %>
<li class="$LinkingMode"><a href="$Link" title="$Title">$MenuTitle</a>
<% if Children %>
<ul>
<% control Children %>
<li class="$LinkingMode"><a href="$Link" title="$Title.XML">$MenuTitle</a></li>
<% end_control %>
</li>
<% end_control %>
</ul>
<% end_if %>Am I missing something? Anyone got a clue how to make it work?
Thanks in advance,
m-obi
-
Re: How to set up Sub-sub-menu to my site??

18 August 2009 at 3:34am
I tried a little harder and came to THE solution. For anyone who has the same problems, just do it this way:
<% if Menu(2) %>
<div id="Menu2Top">
<% control Level(1) %>
<h2><a href="$Link">$Title</a></h2>
<% end_control %>
</div>
<ul id="Menu2">
<% control Menu(2) %>
<li class="$LinkingMode"><a href="$Link" title="$Title">$MenuTitle</a>
<% if Children %>
<ul>
<% control Children %>
<li class="$LinkingMode"><a href="$Link" title="$Title">$MenuTitle</a></li>
<% if LinkOrSection = section %>
<% if Children %>
<% end_if %>
<% end_if %>
<% end_control %>
</ul>
<% end_if %>
</li>
<% end_control %>
</ul>
<% end_if %>
| 1874 Views | ||
|
Page:
1
|
Go to Top |

