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

Site wide login / logout area

Go to End

2 Posts   1655 Views


Community Member, 1 Post

18 September 2008 at 12:37pm

Hi All,

I'm brand new to the CMS and am testing functionality and starting some development with it. So far it seems great. One question though. I want to have a site wide login form at the top right corner of my site. This would turn to "logout" when the user has logged in. What is the best way to accomplish this?



Community Member, 470 Posts

18 September 2008 at 1:47pm

Use the variable $LoginForm in your template.

This will redirect users to the admin area.

If you need to customize the form further beyond CSS, there is a login form widget which just has the html code that is outputted from $LoginForm (or you could copy it yourself from the output). You can customize that and change the hidden form variable which redirects to the admin page. Can be anything you want.