简体   繁体   English

覆盖果园视图模板

[英]Overriding orchard view template

I want to customize/change html/css of the login page (~/Modules/Orchard.Users/Views/LogOn.cshtml). 我想自定义/更改登录页面的html / css(〜/ Modules / Orchard.Users / Views / LogOn.cshtml)。

I created a cshtml file under the themes folder (Themes - MyCustomTheme - Views - LogOn.cshtml) with the same name. 我在主题文件夹(主题 - MyCustomTheme - Views - LogOn.cshtml)下创建了一个同名的cshtml文件。 This didn't work. 这没用。 How can I override the main LogOn.cshtml from my custom theme? 如何从我的自定义主题覆盖主LogOn.cshtml?

Edit: 编辑:

If I enable shape tracer, this is what I see, 如果我启用形状跟踪器,这就是我所看到的,

Active Template: ~/Modules/Orchard.Users/Views/LogOn.cshtml ​ 活动模板:〜/ Modules / Orchard.Users / Views / LogOn.cshtml

Alternate (1): ~/Themes/SafeMode/Views/LogOn.cshtml Alternate(1):〜/ Themes / SafeMode / Views / LogOn.cshtml

Thanks. 谢谢。

LogOn is just a shape as anything else, so you can override it as you did in your own theme (this theme must be active of course) LogOn只是一个形状,所以你可以像在自己的主题中一样覆盖它(当然这个主题必须是活动的)

It can happen that it does not instantly get picked up by Orchard, so you could try to reset the site/application pool. 可能会发生它不会立即被Orchard拾取,因此您可以尝试重置站点/应用程序池。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM