Jump to:

23490 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » CMS page changed with theme change

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 2
Go to End
Author Topic: 1731 Views
  • Moose
    Avatar
    Community Member
    26 Posts

    CMS page changed with theme change Link to this post

    Hi.

    I'm on day 2 of SS discovery. Having a blast and looking forward to really getting my teeth into it.

    I am having an obscure problem that I see was reported in an archived forum post - there didn't seem to be much of a resolution. I have created a custom theme, defined a new Page.ss and edited the _config file to set the theme. The problem is that when I now try to log in to the CMS I see my new Page.ss (the $Content variable gives "Enter your email address and password to access the CMS." and, obviously, there are no fields etc. I have attached the screenshot - excuse the embarrassing design.

    I haven't changed anything in the CMS folder - I see that there are a bunch of templates there but can't see which would render the log in page.

    Any help would contribute to my marginal sanity!
    Thanks

    PS: I notice that this $%ppy table-based layout fails in Firefox - it's fine in IE. I'd be interested if anyone can point out why that may be the case - I've emptied layout.css...

    Attached Files
  • dio5
    Avatar
    Community Member
    501 Posts

    Re: CMS page changed with theme change Link to this post

    Just to make sure, have you added the $Form variable as well?

    cheerz

  • Moose
    Avatar
    Community Member
    26 Posts

    Re: CMS page changed with theme change Link to this post

    No. My intention was not to modify the way the CMS works yet at all. I assumed that it is entirely independent of any new theme I define...

  • dio5
    Avatar
    Community Member
    501 Posts

    Re: CMS page changed with theme change Link to this post

    You need the $Form variable on your templates/Layout/Page.ss in order to see the form fields.

  • Moose
    Avatar
    Community Member
    26 Posts

    Re: CMS page changed with theme change Link to this post

    I'm sorry - I don't understand. Are you saying I have to build the log in page from scratch if I define a new theme? I would have thought that the CMS would be unaffected by the addition of a theme...

    I must be missing something here!

  • dio5
    Avatar
    Community Member
    501 Posts

    Re: CMS page changed with theme change Link to this post

    Noo!

    In the template Page.ss where you have $Content, you also need to add in $Form. Only that tag or variable or how you want to call it.

    If you don't have $Form in it, it won't render the loginform.

  • Moose
    Avatar
    Community Member
    26 Posts

    Re: CMS page changed with theme change Link to this post

    Thanks... I think I may understand the source of my confusion. If I'm not mistaken, the login page is rendering based on the Page.ss specification of the active theme. This is backed up by the fact that if I include the $Form variable in my Page.ss I can log in and the CMS then renders as expected.

    This still seems strange to me - surely the log in page should render according to an independent template? Is there a way of achieving this?

  • Willr
    Avatar
    Forum Moderator
    5508 Posts

    Re: CMS page changed with theme change Link to this post

    The login form is rendered in the default Page.ss template, if you want a custom login template you can create a Security_login.ss template in your themes templates/Layout folder

    1731 Views
Page: 1 2
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.