Jump to:

5450 Posts in 1672 Topics by 1197 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Custom login page type

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

Page: 1
Go to End
Author Topic: 6614 Views
  • Phill
    Avatar
    Community Member
    75 Posts

    Custom login page type Link to this post

    Hi

    The defualt login form currently uses the Page.ss template does anyone know what i would need to call a template file to control the view of the login form page.

    Thanks

  • Big Bang Creative
    Avatar
    Community Member
    92 Posts

    Re: Custom login page type Link to this post

    I need to know this aswel

  • Ben Gribaudo
    Avatar
    Community Member
    181 Posts

    Re: Custom login page type Link to this post

    If you want to wrap the login form with a layout template, name the template Security_login.ss. You'll want to include the $Content variable (and $Form, I think) in that template.

    The form elements for the login form are assembled by the current Authenticator. If you are using SilverStripe's default (MemberAuthenticator), the form is generated by sapphire\security\MemberLoginForm.php.

    Hope this helps!
    Ben

  • micahsheets
    Avatar
    Community Member
    164 Posts

    Re: Custom login page type Link to this post

    To get this to work I had to name my template file Security.ss instead of Security_login.ss. Security_login does not exist and the actual page is called Security and it has an action called login.

  • Ben Gribaudo
    Avatar
    Community Member
    181 Posts

    Re: Custom login page type Link to this post

    What version of SS are you using? Did you put the Security_login.ss file in templates/ or in templates/layout/?

    Ben

  • mrmoree
    Avatar
    Community Member
    1 Post

    Re: Custom login page type Link to this post

    Hi,
    where do i have to place my Security_login.ss File?

    thanks

    oliver

  • banal
    Avatar
    Community Member
    901 Posts

    Re: Custom login page type Link to this post

    The Security_login.ss belongs in the templates directory of your project folder (usually "mysite"). If you're using a themed site, it should be located in the appropriate themes directory.
    I haven't tried it with a themed site yet, but it definitely works for a "non-themed" site.

  • Ben Gribaudo
    Avatar
    Community Member
    181 Posts

    Re: Custom login page type Link to this post

    Yes, a custom Security_login.ss works with themed sites, too.

    FYI--related to what you're trying to do--there is/was a bug where the login form's contents sometimes would be in $Content and other times in $Form. See http://open.silverstripe.org/ticket/3750 for a fix.

    Ben

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