Jump to:

3447 Posts in 1032 Topics by 872 members

Template Questions

SilverStripe Forums » Template Questions » [Solved] Remove Login/logout from main menu

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

Page: 1
Go to End
Author Topic: 1402 Views
  • GibMo
    Avatar
    Community Member
    17 Posts

    [Solved] Remove Login/logout from main menu Link to this post

    By default the website login/logout button for the website is positioned in the main menu. Is it possible to remove this button from this menu and put it in a separate sitewide menu containing buttons like contact/disclaimer/ etc?

    I am using the ssdropdown menu and the tutorial template

  • 3dgoo
    Avatar
    Community Member
    133 Posts

    Re: [Solved] Remove Login/logout from main menu Link to this post

    You could do this by putting the same Login/Logout links in your Navigation.ss

  • GibMo
    Avatar
    Community Member
    17 Posts

    Re: [Solved] Remove Login/logout from main menu Link to this post

    Txz for your repsons ampedup.

    But that will not help getting rid of the log in / log out button on the main menu. I think I need something I can put in the _config.php. Just like you do when you want to remove a tab in the CMS
    i.e. CMSMenu::remove_menu_item('SecurityAdmin');

    But i am just a front end developer so I really do not know..

  • 3dgoo
    Avatar
    Community Member
    133 Posts

    Re: [Solved] Remove Login/logout from main menu Link to this post

    If you are talking about the bottom bar in this image:
    http://doc.silverstripe.org/tutorial:1-building-a-basic-site#try_it

    Then this is removed by removing $SilverStripeNavigator from the Page.ss template.

    This is described here:
    http://doc.silverstripe.org/tutorial:1-building-a-basic-site#templates

  • GibMo
    Avatar
    Community Member
    17 Posts

    Re: [Solved] Remove Login/logout from main menu Link to this post

    I really mean the navigation for my main menu. Somehow in this menu there is a item to log in as a member of a certain Security group. It is fine there is a link on my site for user to log in. But I do not want it in my main menu.

    For reference I added a screenshot after logging in with my default Admin account. As you can see there are 2 buttons on the right ofr the menu: "Admin" and "Log out". Before logging in only "Log in" is displayed.

  • 3dgoo
    Avatar
    Community Member
    133 Posts

    Re: [Solved] Remove Login/logout from main menu Link to this post

    There is probably something in your Navigation.ss or Page.ss (depending on where the main menu navigation code is) bringing up those items.

    Have a look in there and see if it is there, or paste the code of you want us to have a look.

  • GibMo
    Avatar
    Community Member
    17 Posts

    Re: [Solved] Remove Login/logout from main menu Link to this post

    Many thanks for pointing me in the right direction Ampedup!

    It was in the MenuSmooth.ss.

    1402 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.