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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Template Questions /

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

What show the substitution of the other point main menu?


Go to End


1575 Views

Avatar
BangMan

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:

Root
|__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 /
|______subItem1-4_____/

In Page.ss I write:

<% if Menu(2) %>
<ul id="Menu2">
<% control Menu(2) %>
<li><a href="$Link"">$MenuTitle</a></li>
<% end_control %>
</ul>
<% 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?