Question

We're busy investigating Orchard CMS as an alternative to existing Asp.net based CMS systems that we use. We came across Orchard, installed it and started on the tutorials.

The one part that confuses me is layers. We don't have anything in other CMSs that seem to compare to this.

What we're used to, is having a couple of master pages (or templates) then you create a new page and choose a template for the page and add widgets to the various container areas.

Here you seem to create multiple layers and apply them based on URL rules (or perhaps others too).

Questions:

  1. Assuming these are layers, as in Photoshop layers, it would seem that you're adding widgets to layers from the bottom of the stack which means that a widget added to the bottom most layer will appear in the top most layer. Is that correct? Or can one use rules to omit a layer?
  2. Has anyone documented any obvious pitfalls to this approach?

It just seems like a very odd way to go about things, but perhaps just because we're not used to it.

Thanks,

Was it helpful?

Solution

The name can be confusing because it does sound like there would be some sort of z-index ordering or something. However, layers' only job is to determine whether or not a shape gets rendered. If a layer rule returns true, the shapes in that layer will be visible. If a layer rule returns false, the shapes in that layer will not be rendered. That's all there is to it.

This is really useful for authenticated/non-authenticated scenarios. Also, since the layer rules are extensible, you can add your own complex scenarios. Say for example, you want to have widgets on your site during work hours only. You could build your own layer rule extension and create a layer for widgets called "office-hours-only".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top