This project is read-only.

Confusion about zones

Topics: Writing themes
Nov 6, 2012 at 12:05 AM


I'm following a tutorial and I've got a question about zones. I created a new, empty theme that has no zones defined. I then enabled this them with the default content that comes with the basic Orchard recipe.

I then created a new layout.cshtml file in my theme. In this them I put in the code:

@if (Model.Navigation != null) {
@if (Model.Content != null) {
@if (Model.TripelThird != null) {

When I view the page the TripelThird content is displayed. However, there is no TripelThird zone in the new theme. I don't get why this works (or the navigation for that matter).

Don't zones have to be defined in order to put content into the theme? Also, in the new theme I don't seem to have any way to access the content in the TripelThird widget since it doesn't show up in any zone.

Can someone shed some light for a n00b?


Nov 6, 2012 at 1:25 AM

You just defined three zones: Navigation, Content and TripelThird. The declarations in the manifest only make the zones available from the widget management screen.