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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

control menu 2 doesn't work


Go to End
Reply


3 Posts   1480 Views

Avatar
bebabeba

Community Member, 193 Posts

18 September 2010 at 3:11am

Hi!
I have a problem width second level menu..
help please.. I see nothing..

<table border="1" cellpadding="0" cellspacing="0" width="100%">
<tr>
<% control Menu(1) %>
<td width="14%" valign="top">
$MenuTitle
</td>
<% end_control %>
</tr>

<tr>
<% control Menu(2) %>
<td width="14%" valign="top">
$MenuTitle
</td>
<% end_control %>
</tr>

</table>

Avatar
Willr

Forum Moderator, 5521 Posts

18 September 2010 at 11:37am

Menu2 will only return pages if you are on the second level (or greater) and the sibling pages are allowed to be shown in menus.

If you're on a top level page then you won't see a menu 2.

Avatar
wmboy

Community Member, 3 Posts

29 April 2011 at 9:57am

If you do want to show a menu 2 control on any page by itself, there is a way around it;

<% control Menu(1) %>
<% if Children %>
<ul>
<% control Children %>
<li><a class="$LinkingMode $MenuTitle" href="$Link" title="Go to the {$Title} page">$MenuTitle</a></li>
<% end_control %>
</ul>
<% end_if %>
<% end_control %>