-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LoginForm_Edit shape unable to override the view #15799
Comments
There were breaking changes, see: https://docs.orchardcore.net/en/latest/docs/releases/1.9.0/#users-module Please follow that. |
Oh I've got it, just went through the pain of discovering how the shape looks like and read through all sections. So my key takeaways and fix me if I'm wrong here: Content here: Still I can override the LoginFormCredentials, but how should I name my LoginForm.Edit.cshtml to replace the original content? Sorry for being a noobie here. |
You should be able to place a LoginForm.Edit.cshtml file into your module that depends on What exactly did you try? Also see this that may help for future such cases: https://github.com/Lombiq/Helpful-Extensions?tab=readme-ov-file#shape-tracing-helpful-extensions |
Related: #15701 |
@MikeAlhayek could you please chime in |
Hisham, I think @Piedone handled it. If someone is overriding the Login.chtml, they should adhere to these changes. If you want to override Login.cshtml then you should render the LoginForm shape somewhere in your file. Then you can also override the sub views as needed. @nbalu are you facing issues after reading @Piedone comments above? |
Nope, so far I haven't checked the view resolutiin yet that Zoli suggested but my issue wasn't answered/solved. What I did was to override: The first and last views I'm able to replace but LoginForm.Edit.cshtml is not overriden always the built in form gets generated. I'm playing around with orchard and based ona design I'm creating a custom OIDC "server". Which is better then starting from scartch. Though I need to touch every html that gets renderd to be able to style things. |
So when you call DisplayAsync(Model) in the login.cshtml you are rendering the LoginForm_Edit shape using the "LoginForm.Edit.cshtml" since it has no alternates. The LoginForm.Edit.cshtml will the. render LoginFormCredentials.cshtml in the Content zone and other views in other zones. If you are having any issue, I suggest that you post the views you created to override the default templates so we can help you better. If you want to override any of the default views as @Piedone stated, you'll need to define the same views in a Theme project, or in a module that has physical reference to Orchard.User package. |
@nbalu did you figure it out or do you still think there is an issue? |
Hey Mike, yes I've just solved it. But this was a wierd lesson for me: On github the paths are: Within my repo: Turns out that shape resolution works only on root level thus this worked: And logging at least shows that there's a shape, but still misleading as I've tried to map corresponding to it:
It would be nice if the logger would show which path is treated as "Alternate" source and what's not. Plus if there would be a way to encapsulate them on feature basis. Even within a single project. My issue with this way of coding is that it will be hard to distinct with what's overriden within orchard and what's my content definition. Plus I feel like "shape" should relate to content types not for "built-in" pages. 🤷 Though I'm in the accomodation phase where I try to oppress my coding instincts before judge any framework or authoring logic of yours before being experienced enough to argue with you 😆 This was a true RFTM issue of mine. And I really appriciate the responsiveness of the community of yours. It's great to see how helpful You are and respect what you are doing here. Kudos |
Awesome! |
It seems like that with the revamped login I'm unable to override the LoginForm.Edit.cshtml.
The LoginFormCredentials.cshtml works. Not sure what's wrong with the Edit.cshtml.
using: 1.9.0-preview-18184
The text was updated successfully, but these errors were encountered: