Skip to content
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

Custom themes cannot override ShapeView in 1.9.x #15924

Closed
hyzx86 opened this issue Apr 30, 2024 · 8 comments
Closed

Custom themes cannot override ShapeView in 1.9.x #15924

hyzx86 opened this issue Apr 30, 2024 · 8 comments
Labels

Comments

@hyzx86
Copy link
Contributor

hyzx86 commented Apr 30, 2024

Noticing that 1.9.x-preview extracts a few HTML elements from the landing page into shapes,
I updated my theme with the latest template
But I found that the ShapeView part didn't render successfully. I tried to add a feature in the theme module using the following method, but it didn't work
“Layout” could not be found

image

It appears that the content of LoginFormCredentials.Edit.cshtml is not functioning as expected.
At this point, I would recommend performing a specific set of operations.
Would it be necessary to render this block of content separately in its own module?
However, if switching themes, what should one do.

image

@MikeAlhayek
Copy link
Member

I don't think I understand what you are trying to do or what the issue is. But you should be aware of the User Module changes https://docs.orchardcore.net/en/latest/releases/1.9.0/

If you are overriding Login.cshtml in your solution or theme, then make sure you follow the change done in this PR https://github.com/OrchardCMS/OrchardCore/pull/15701/files#diff-96085c1f65af07a38df0a90afc8d8b4da49b63382c30aaa6fef204fdbd36ff8d

Now if you like to style LoginFormCredentials you should do so by creating LoginFormCredentials.cshtml not LoginFormCredentials.Edit.cshtml

@hyzx86
Copy link
Contributor Author

hyzx86 commented Apr 30, 2024

Now if you like to style LoginFormCredentials you should do so by creating LoginFormCredentials.cshtml not LoginFormCredentials.Edit.cshtml

I'm sorry I made a mistake,I'll try right away.

@hyzx86
Copy link
Contributor Author

hyzx86 commented Apr 30, 2024

Great!🎉🎉🎉🎉🎉 It works, thanks for the correction!
image

@hyzx86 hyzx86 closed this as completed Apr 30, 2024
@hyzx86
Copy link
Contributor Author

hyzx86 commented May 1, 2024

@hishamco,
Thanks for sharing, but your implementation is no longer available in the latest version of OC.

It will prompt the Model type, which is inconsistent with the expected type.😄

https://github.com/OrchardCoreContrib/OrchardCoreContrib.Modules/blob/7fcd4fef7f491e77d571d1a2346900f5f35ceb7c/src/OrchardCoreContrib.Themes.Admin/Views/OrchardCore.Users/Account/Login.cshtml#L6

@hishamco
Copy link
Member

hishamco commented May 1, 2024

Thanks for sharing, but your implementation is no longer available in the latest version of OC.

I just started updating to 1.8.3, I'm glad if you open a PR for it

@hyzx86
Copy link
Contributor Author

hyzx86 commented May 1, 2024

I'm adapting 1.9.x, mainly because the Graphql enhancements are useful to me 😁

@hishamco
Copy link
Member

hishamco commented May 1, 2024

I see :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants