Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Double menu on login page

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

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

Page: 1
Go to End
Author Topic: 1689 Views
  • blaater
    Avatar
    Community Member
    22 Posts

    Double menu on login page Link to this post

    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.

  • Andy
    Avatar
    230 Posts

    Re: Double menu on login page Link to this post

    Try surrounding your Menu(2) with:

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

    ...

    <% end_if %>
    [/html]

  • blaater
    Avatar
    Community Member
    22 Posts

    Re: Double menu on login page Link to this post

    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!

  • Andy
    Avatar
    230 Posts

    Re: Double menu on login page Link to this post

    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.

    1689 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.