This project is read-only.

Zone confusion

Topics: Core, Customizing Orchard
Aug 1, 2013 at 9:43 AM
Edited Aug 1, 2013 at 9:44 AM
I’m new – having a ball with Orchard – though this “zone” terminology is confusing the crap out of me! Between the O’Reilly book, and what is said here, and what the Orchard docs say, I am keen to reconcile what a ‘zone’ or a ‘local zone’ actually is.

My understanding originally was that a zone is to do with layout, as per the image that appears in the widgets section in the admin.

Clearly the placement file snippet below is NOT adding all the datetimes “before” the themes “content” zone. That would be silly. Yet that’s what it seems to be declaring?

<Place Fields_DateTime="Content:before">

If “content” in this context is not the zone called “content” in the widgets page's image/diagram, what is it? Where does it come from, and what are the other options?

Aug 1, 2013 at 8:34 PM
Try "/Content:before"
Aug 6, 2013 at 12:08 PM
Now I am confused all the more.

As I don't know what "Content:before" means, I certainly don't know what "/Content:before" means.

"Content" is a zone. There is a zone above it (called "BeforeContent"). The statement <Place Fields_DateTime="Content:before"> would appear to be saying to place all dateTime fields in this zone - which makes no sense (and obviously does not occur)

I'm clearly missing a fundamental concept here - will try reading more of the docs and see if it gels (usually does...eventually).

Thanks anyway, much appreciated.
Aug 6, 2013 at 7:47 PM
Did you read ?

"Content:before" means place this shape into the Content local zone, before anything else you already have in there. For this to work, you would need a "Content" zone defined locally inside of the Content.cshtml template, which is where the local zones are defined.

"/Content:before" is telling the system that "Content" is not a local zone but a global one, one that is defined in layout.cshtml.
Aug 7, 2013 at 2:27 AM
I had read that but wasn't really following what it was saying. But your last answer makes perfect sense, get it now, thanks!