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

[Solved] Remove Login/logout from main menu


Go to End


7 Posts   2358 Views

Avatar
GibMo

Community Member, 17 Posts

12 September 2010 at 10:08pm

Edited: 28/09/2010 5:43am

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

Avatar
3dgoo

Community Member, 135 Posts

15 September 2010 at 1:45pm

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

Avatar
GibMo

Community Member, 17 Posts

17 September 2010 at 8:15am

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

Avatar
3dgoo

Community Member, 135 Posts

17 September 2010 at 11:36am

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

Avatar
GibMo

Community Member, 17 Posts

17 September 2010 at 6:45pm

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.

Avatar
3dgoo

Community Member, 135 Posts

21 September 2010 at 2:55pm

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.

Avatar
GibMo

Community Member, 17 Posts

21 September 2010 at 7:05pm


Many thanks for pointing me in the right direction Ampedup!

It was in the MenuSmooth.ss.