Layers, Zones, Widget and Pages - did I miss something

Topics: Customizing Orchard, General
Mar 6, 2011 at 8:26 PM
Edited Mar 6, 2011 at 8:27 PM

Hi All

This is my first post having finally installed Orchard (1.0.20.0) and tried toget my head round it.

I am a .NET developer (although not ASP.NET really) and so should be able to work out what is going on, but I feel like I am missing something small yet significant in piecing together the relationship between Layers, Zones, Widgets (which generally I think I get) and Pages.

Layers seem straightforward enough - each Layer able to support a Rule that decides whether it should be displayed or not - if more than one are true then they are combined (Layered as the name suggests). Each Layer has a number of Zones and each Zone can have zero or more Widgets in them. What seems to be missing is defining what a Page should look like and when it should be available.

As a general observation it seems that a Page is not really anything special at all. Creating a new page simply means the body content will appear in a predefined area (Zone) within a Layer. As far as I can work out I could just as easily add the Menu Widget to any ContentType and it would behave like a Page. It seems like a Page isn't anything significant atall, but just a name of a ContentType like any other ContentType that has the Menu Widget on it.

What I was expecting/hoping for was that Pages were more significant and that they were perhaps the top most item and they had a Layout associated with them. I should be able to add Widgets to Layout definitions (as I appear to be able to do now) which means any Page based on it will have that Widget on it. But also I should be able to add Widgets to Pages (which should be represented in a similar fashion to a Layout - kind of inherited from a Layout) and with it own Rule. That way Pages can appear based on Roles but also have a Layout, whilst still inheriting from Layout definitions.

I feel that perhaps Layouts should be nestable - e.g. we have our top level Layouts (default, HomePage, authorised, anonymous etc) but within any of the Zones within these Layouts I should be able to place a Layout Widget which inturn has content. This is the other aspect I am struggling with the most. I want to layout my main content of a page in columns etc but there does not appear to be a simple way to achieve this.

 Please do correct me / point out where I have gone wrong - or otherwise confirm my findings? Any pointers greatfully received.

Thanks

Coordinator
Mar 9, 2011 at 12:04 AM

You are correct. Actually, that idea of nested layouts is entirely doable and something that's been in the back of our heads from the start :) the way you would do that is by building shapes that themselves have child shapes to which content can be injected. It would definitely be an interesting module.

Developer
Mar 9, 2011 at 1:07 AM

Hi,

I'm in the middle of delivering exactly that feature:) - the dynamic layout functionality, so you'd be able to define your own layout (with nested shapes) from the Dashboard GUI (instead of hardcoded one in the theme as it is currently).  I'm also planning a feature that would allow to define different layouts for different layers.

What do you think about that?

- Piotr

Coordinator
Mar 9, 2011 at 3:23 AM

Fantastic!

Mar 9, 2011 at 9:15 AM

That sounds great - do you have any idea of likely timescales on this...I am thinking I would wait before going any further if it is likely to be sooner rather than later.

Currently my (theoretical) 'workaround' would be to treat some Layers as Pages (so I can utilise the Rule for hiding Pages) - so I would have some 'proper Layers' and then for any Pages that need a Rule I would not have a Page, but instead have a Layer with a Widget in the Content area that contains the Menu part, so it would diaplay a tab like a Page but only if the Layer were displayable.

Don't know if this would work yet - need to try it out.

Developer
Mar 9, 2011 at 12:28 PM

It would definitely be ready sooner than later - I guess I should have a tested and working module by the end of the week.

- Piotr

Mar 9, 2011 at 8:56 PM

Much quicker than I had dared hope...I would be please to give it a whirl - repsond to this discussion when you have it posted (as I get am email to prompt me if you do that) and I will try it out.

Sep 27, 2011 at 1:10 AM
pszmyd wrote:

It would definitely be ready sooner than later - I guess I should have a tested and working module by the end of the week.

- Piotr

Hi Piotr,

 

Were you able to get this to work?

 

-venkat