Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I specifiy an alternate layout for NotFound.cshml and ErrorPage.cshtml in Orchard CMS

Tags:

orchardcms

I know you can use layout filters for normal pages with urls, but upon errors the view changes while keeping the url the same, so I can't utilize a new layout based on the path. Any help would be appreciated. Thank you!

like image 412
stackDat Avatar asked Jan 25 '26 21:01

stackDat


1 Answers

Off the top of my head:

If you look in Core > Shapes > Views, you will see two files - one called ErrorPage.cshtml and one called NotFound.cshtml. Simply copy these files and paste them into your theme's view folder.

I have not tested this method with these particular pages, but I did do something similar with the LogOn widget.

Something to bear in mind is that the contents of these files will be rendered in the Content zone of your current theme.

like image 103
Chris Payne Avatar answered Jan 28 '26 06:01

Chris Payne



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!