This project is read-only.

Zone code (model.zonename)

Topics: Customizing Orchard
Jun 6, 2011 at 5:00 PM

Where is the code for a zone located? Is this saved on the database and dynamically pulled or is it an actual page somewhere in the source code?

For example,

@if (Model.Header != null) {

Jun 6, 2011 at 5:21 PM

What are you asking - where is the zone template, or how do zones get built?

Jun 6, 2011 at 5:22 PM

Where is the zone template? :)  So, where is the template for Model.Header in my example?

Jun 6, 2011 at 7:20 PM

It's in coreshapes.cs. It's not a template, it's a shape method. But it can be overridden by templates, in particular with named alternates. Shape Tracing can show you for example that you can override the header zone rendering by dropping a zone-header.cshtml file into Views in your theme.