Jump to:

23552 Posts in 19349 Topics by 2891 members

General Questions

SilverStripe Forums » General Questions » Editor for Login Page

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 1802 Views
  • steve_nyhof
    Avatar
    Community Member
    224 Posts

    Editor for Login Page Link to this post

    I have been wanting to find a way to add a Login page type so that I can edit the content on the login page...

    http://mywebsite.com/Security/login

    Several things would be nice here...

    One, being able to change and edit the content on this page, as an extension to the Page type

    But also, for visitors wanting to access a private page, the system now just tells them they do not have permission, but no further instruction as to what to do. So they leave frustrated. I want to be able to tell them that they need to sign up, or something, offering a link to do what they want to do.

    I'm not sure if these functions would be able to be handled in the same Login.php and Login.ss files?
    I would think a page with several tabs for each situation would be cool!

    And direction and example code would be appreciated.

    Thank you,
    Steve

    Attached Files
  • Willr
    Avatar
    Forum Moderator
    5511 Posts

    Re: Editor for Login Page Link to this post

    You can specify your own template for the login page. Make a Security.ss (or Security_login.ss) file in your themes template/Layout directory and you can customize it how you wish. If you want to add a CMS content editable element to it you could do so but putting the field on the SiteConfig panel then calling it in the template $SiteConfig.LoginText.

    See http://doc.silverstripe.org/sapphire/en/reference/siteconfig for information about adding fields to SiteConfig.

  • steve_nyhof
    Avatar
    Community Member
    224 Posts

    Re: Editor for Login Page Link to this post

    Thank you Willr!
    I will have my programmer take a look at your content here
    Steve

  • steve_nyhof
    Avatar
    Community Member
    224 Posts

    Re: Editor for Login Page Link to this post

    Can this be applied to 2.3 ? Can you offer a simple example?

  • Willr
    Avatar
    Forum Moderator
    5511 Posts

    Re: Editor for Login Page Link to this post

    No, SiteConfig was introduced in 2.4 so you cannot create a site config interface for it in early versions. You could put the CMS fields on another pagetype (homepage is normally a good option).

    You should be able to do a custom template for Security at least for 2.3. Not really an 'example' to show, just make a Security_login.ss template file in your themes layout folder (or a Security.ss for all the security section).

  • steve_nyhof
    Avatar
    Community Member
    224 Posts

    Re: Editor for Login Page Link to this post

    Thank you. My programmer said that it would take 2.4 also, and we have already started with many changes to 2.4, and will implement it there.

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