Jump to:

22999 Posts in 11854 Topics by 2828 members

General Questions

SilverStripe Forums » General Questions » Editing/Adding Content to the 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: 1312 Views
  • dizzystuff
    Avatar
    Community Member
    93 Posts

    Editing/Adding Content to the Login page Link to this post

    Hi All

    I've tried all sorts of searches here in the forum but haven't been able to come up with much.

    I'm sure I'm just in the middle of some epic brainfreeze and this is a really obvious thing -> but how on earth can an editor update the text on the /Security/login page?

    Is this accessible from the CMS? If not, is there a way to create a new login page that is, and then redirect /Security/login to it?

    Open to any and all weird and wonderful suggestions. Forehead-slaps will also be accepted if appropriate

    Cheers
    Luke

  • Juanitou
    Avatar
    Community Member
    322 Posts

    Re: Editing/Adding Content to the Login page Link to this post

    Hi Luke.

    Just create a Security_login.ss file in your templates folder.

    Hope it helps,
    Juan

  • dizzystuff
    Avatar
    Community Member
    93 Posts

    Re: Editing/Adding Content to the Login page Link to this post

    Hey Juan

    Thanks for that, it works a treat for me as a dev being able to take control of the page. I'm still not sure how editor users could access it? It's less of an issue for me now though, thanks to you pointing out Security_login.ss. Also I've found some of the $lang stuff so I'm overwriting some of the default text for the page via my main _config.php.

    ***

    Issue now is I'm trying to add a widget to the sidebar of /Security/login page.. but without it being in the site tree in the CMS I'm a little lost on how to do this. I might create a diff thread for this question but thought I'd ask on this one first.

  • dizzystuff
    Avatar
    Community Member
    93 Posts

    Re: Editing/Adding Content to the Login page Link to this post

    Actually, I've sorted the issue regarding Widgets on the Login page, in short I've added "securityLoginWidget()" function to Page_Controller which retrieves a particular widget via DataObject::get_by_id(), and then in Security_login.ss I use <% control securityLoginWidget %> to render it on screen.

    Probably a little hacky, but it's doing the trick for the time being.

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