Do All Themes needs a Layout shape? #15128
Replies: 2 comments 2 replies
-
Just to clarify, by MVC do you mean using Razor templates? Because if you create a theme with Razor template, then yes, you still need a Layout shape. You need to put it into the root of the If you mean to create your own MVC frontend without Orchard Core theming, then you're after the decoupled approach. |
Beta Was this translation helpful? Give feedback.
-
By defining OC theming layout are not same as MVC layout, OC Layout are Shapes. to use OC theming and Layout shapes create Once the theme is enabled, all pages will use your Layout.cshtml shape For some reason if you need to specify specific layout shape to specific page, you can define |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to create a theme that uses MVC instead of the usual liquid but I'm having an issue in rendering _Layout.cshtml.

Here is what I tried:
-Set the path in _ViewStart as
@{ Layout = "_Layout"; }
-Set the path in _ViewStart as
@{ Layout = "~/Views/Shared/_Layout.cshtml"; }
it gives me Exception: Shape type 'Layout' not found
My question is Do I need to use shapes and define a Layout shape even if I'm using MVC?And is there a difference in setting up the theme whether in liquid, razor or MVC
Beta Was this translation helpful? Give feedback.
All reactions