23377 Posts in 18296 Topics by 2867 members
|Go to End|
10 March 2011 at 6:02am
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...
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.
10 March 2011 at 2:16pm
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.
10 March 2011 at 3:46pm
Thank you Willr!
I will have my programmer take a look at your content here
16 March 2011 at 3:40am
Can this be applied to 2.3 ? Can you offer a simple example?
17 March 2011 at 8:32pm
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).
18 March 2011 at 2:20am
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.
|Go to Top|