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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Archive /

Our old forums are still available as a read-only archive.

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

Double menu on login page


Go to End


4 Posts   1984 Views

Avatar
blaater

Community Member, 22 Posts

25 July 2007 at 8:52am

Hello everybody!

I've got a problem with my login-page.
In my page.ss I've got a menu(1) and a menu(2) for all the sub-items showing in a different menu.
When I go to the /admin page both the menu's show the same item.
Is there a proper solution for this?

Thanks for your help.

Avatar
Andante

Community Member, 231 Posts

25 July 2007 at 10:24am

Try surrounding your Menu(2) with:

[html]
<% if Level(2) %>

...

<% end_if %>
[/html]

Avatar
blaater

Community Member, 22 Posts

26 July 2007 at 5:04am

Edited: 26/07/2007 6:19am

That worked, only I still got a similar problem right now.
When is use the <% if Level(2) %> the loginpage looks allright, but on all the other pages the menu doesn't show up.
Here's the code of the menu:

[html]
<% if Level(2) %>
<ul id="Menu2">
<% control Menu(2) %>
<% if Last %>
<li class="$LinkingMode" id="menu2-last"><a href="$Link" title="{$Title}">$MenuTitle</a>
<% else %>
<li class="$LinkingMode"><a href="$Link" title="{$Title}">$MenuTitle</a>
<% end_if %>
</li>
<% end_control %>
</ul>
<% else %>
<% if Title = Home %>
<ul id="Menu2"><li class="$LinkingMode"><a href="$Link" title="{$Title}">Welkom</a></li></ul>
<% else %>
<ul id="Menu2"><li class="$LinkingMode"><a href="$Link" title="{$Title}">$Title</a></li></ul>
<% end_if %>
<% end_if %>
[/html]

Thanks for the support!

Avatar
Andante

Community Member, 231 Posts

27 July 2007 at 9:57am

I'm not entirely sure what you are trying to do with the chunk after the else, but try moving that bit out of the Level(2) check.