Masterpage in Orchard

Topics: Installing Orchard
Feb 15, 2011 at 2:21 PM
Edited Feb 15, 2011 at 2:58 PM

I know there is no any masterpage, but how does the Orchard do it? Even the simplest module "hello world" has the same header and footer.

Yes, it's a big question. And I read the document about shape and theme but still has no idea about it. I feel it a little like IoC, right. Usually we include the header and footer in the page we want to display, but here a page Layout.cshtml has been set first, and the custom views in the modules are filled in it. If so, how?

Thanks for your help, even any link for document is helpful. I really want to make it clear.



And I find it's the file F:\Orchard.Source\src\Orchard.Web\Themes\TheThemeMachine\Views\Layout.cshtml that is the framework. I can make use of "Customizing the Default Theme" adjusting it.

Feb 15, 2011 at 7:17 PM

The relevant documentation is here:

The document.cshtml is a wrapper around the layout, which itself is the equivalent of the master page. The layout contains special shapes called zones where different bits of code can inject other shapes, which in turn get rendered by the right template. Does this help?