Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Overriding orchard view template

I want to customize/change html/css of the login page (~/Modules/Orchard.Users/Views/LogOn.cshtml).

I created a cshtml file under the themes folder (Themes - MyCustomTheme - Views - LogOn.cshtml) with the same name. This didn't work. How can I override the main LogOn.cshtml from my custom theme?

Edit:

If I enable shape tracer, this is what I see,

Active Template: ~/Modules/Orchard.Users/Views/LogOn.cshtml ​

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

Thanks.

like image 412
user471317 Avatar asked Dec 08 '25 21:12

user471317


1 Answers

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)

It can happen that it does not instantly get picked up by Orchard, so you could try to reset the site/application pool.

like image 58
devqon Avatar answered Dec 10 '25 22:12

devqon