Is there any guide on how to customize the login page into individual themes project? I am trying to customize the look and feel for the login page & enabling the site theme for login doesnt actually lay it properly. Would appreciate some guidance on what packages need to added to Theme and how to override the look and feel and messages. Thanks in advance!
There's a login view that you could customize it, I remember I did this in the past, let me find a similar issue ...
I did a quick look, unfortuently I didn't find the issue, perhaps I made a PR that has been closed, anyhow your start point is Account\Login.cshml
Thanks @hishamco , does it mean we have to implement Login functionality too in the theme? Is there no known straight way to pass in a template like layout.liquid (/cshtml)?
There's a layout I wrote it first but I remove last sec ;) it's in TheAdminTheme, it called Login-Layout.cshtml if I'm not wrong, both views will allow you to customize the look and feel for the login
There is a setting in the admin to say if the login template comes from the current admin theme or from the currrent site theme (if checked), so that you can provide a custom template from your theme without having to override the admin one.
@VJC-NTT so I am having to do this at the moment.
There is no straightforward shapes you can override. But you can override the views. Docs on how to do that are here https://docs.orchardcore.net/en/dev/docs/reference/modules/Templates/#overriding-login-view
I use my standard theme layout, not a special one, but you can build a Login-Layout if you need it to look different to your normal layout.
I also needed to be able to provide cmsable content to wrap the header and footer of the login related views (selectable banners, extra html text etc)
What I did was create a content type for that, with the fields / parts I needed.
Then in my custom Login views, I retrieve that content type (by alias, an alias for each different page, I think there's 9 of them I've having to do)
I then call BuildDisplayAsync from the display manager, render the custom parts/fields into the zones / areas I need to, and I consider the main content of the login view, i.e. the actual fields, like the body, so my custom content goes around it.
Note: You could also use custom settings to achieve a similar thing, but for me it was better to have actual content items, as I got some versioning, and as there were so many it was easier to do.
You will probably need to take a reference in your theme to OrchardCore.Users to get the view models, unless you translate the views to liquid (I didn't, it was easier not to, as for the most part they're a cut and paste, with some wording changes to the body.
Thanks for the directions @Piedone @hishamco & @jtkech !