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.

Template Questions /

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

What show the substitution of the other point main menu?

Go to End



Community Member, 7 Posts

9 April 2009 at 2:00am

Hello! Sorry for my english (I'm from Belarus :) ). I have Question on SilverStripe - there is such structure of the pages:

|__Item-1 _____
| |______subItem1-1 \
| |______subItem1-2 \ SubMenu-1
| |______subItem1-3 /
| |______subItem1-4_____/
|__Item-2 _____
| |______subItem1-1 \
| |______subItem1-2 \ SubMenu-2
| |______subItem1-3 /
| |______subItem1-4_____/
|__Item-3 _____
|______subItem1-1 \
|______subItem1-2 \ SubMenu-3
|______subItem1-3 /

In I write:

<% if Menu(2) %>
<ul id="Menu2">
<% control Menu(2) %>
<li><a href="$Link"">$MenuTitle</a></li>
<% end_control %>
<% end_if %>

If I Choose Item "Item-1", then "SubMenu-1" is displayed, If I Choose Item "Item-2", then "SubMenu-2" is displayed and etc.
As possible do to if I shall choose "Item-1", then "SubMenu-1" and "SubMenu-2" is displayed or if I shall choose "Item-2", then "SubMenu-1" and "SubMenu-1" and "SubMenu-3" is displayed?