This project is read-only.

Storing and associating content to a given zone in a page

Topics: General, Writing themes
Mar 28, 2012 at 3:52 PM

Firstly, I'm really sorry if this is an idiot question, but I've been looking at the docs for hours now and they really don't work for someone who has just picked up Orchard - however, I'm willing to persevere :)

I have a defined layout which includes two zones - content and sidebar.

I can create a page and assign content to the content zone, but how do I go about assigning content to the sidebar zone?  

Pointers in the right direction would be terrific.

Mar 28, 2012 at 7:20 PM

I'm not really sure what you want to achieve but: only works for local zones, that means you can't (from Placement) push shapes of content part to layout zones (like AsideFirst).

Mar 28, 2012 at 8:03 PM

Yeah, I think this is where I'm just not getting it - shapes, zones, local zones etc etc.

What I want to do is have two bodies of content, Content A and Content B, for a given page, and have Content A displayed in the left hand column, and content B displayed in the right hand column - but a lot of digging has led me to the conclusion that this isnt exactly possible at the moment?  Is that correct?

Or do I need to be defining a second ContentPart to add to the Page Content Type, and modifying Content.cshtml to add that in somehow (Model.SecondContent perhaps?)?

Mar 28, 2012 at 8:30 PM

I don't think this is possible without writing code. If this is for only one page, you could use Html Widgets as a workaround. But if you write your own part, you could push shapes to any zone in the Layout, so basically you can alter the whole layout from a content item.

Mar 28, 2012 at 9:27 PM

Unfortunately its for most pages in the site - it does seem to be quite a limitation unfortunately :(

While I think Orchard merits considerable points for technical build and quality, stuff like this just makes you wonder if it was designed with actual sites in mind ;)

Mar 28, 2012 at 9:53 PM

Then you can achieve this by pushing shapes to zones. BTW using placement to push shapes to non-local zones is currently under consideration, but randompete has already solved that in one of his experimental modules. If you're interested, contact him:

Mar 29, 2012 at 5:31 AM

This is how you do what piedone is talking about:

Mar 30, 2012 at 11:25 AM

TheMonarch, thanks - I have read that post before but I have some issues with it from the viewpoint of a brand new user.  It seems overly complicated when the basic premise should be simple - I want more than one content area per page.  Do I really have to drop to customising code to do that?

That is something that any CMS should be able to handle trivially, and it seems that in Orchard its a struggle - or an I misreading the situation?

Mar 31, 2012 at 12:23 AM

Everybody has a different set of expectations as to what is "something that any CMS should be able to handle trivially". If you start including the union of all these expectations, you obtain a kitchen-sink application à la Word. We went for the opposite approach of building a minimalist but very extensible core and letting people implement what their idea of a good set of features was. If you don't find something in the core distribution, look for it on the gallery. And if you don't find it there, it means that your set of expectations is maybe a lot less common than you had assumed and you'll have to build the feature you need yourself.

Don't forget that each feature that is available had to be built by someone, who presumably needed it enough to put some effort into it. Nobody is entitled to the set of features he expects.

Mar 31, 2012 at 5:13 PM

Well, thank you for that talking down to, it was most enjoyable.

I have looked around and quite a few people do ask for the same thing as myself, and what I want to do seems to be, currently, forbidden by the Orchard system itself - with either very difficult work arounds or hacks in place to accomplish the same results.  I refuse to go to those lengths to achieve what I consider to be one of the core tenants of a CMS - that is, managing content, and at the moment it just feels like the Orchard CMS treats the "C" in CMS as an afterthought, a bad stepchild that it doesn't really want to acknowledge.  

I'm not an unintelligent user coming at this just to run a site, I have the skills and abilities to drop to the code level and (eventually) do it myself, but you know what?  Thats something I also refuse to do - if I wanted to do that, then sod it, I may as well remove all limitations of your system and do the whole thing myself. 

What I want to do is not completely stupid - multiple content areas on a page, with the ability to enter information for each content area on each page instance.  Every other CMS I have used has been able to do that - except, as we come to it, Orchard.  And when asked, I get a load of suggestions pointing here there and everywhere, all of them hacks.  And then I get told, in the best spirit of "open source", to do it myself.  I could do that, but then again I don't want to waste another week or seven of my time acclimatising myself with the innards of your system.

I had great hopes for Orchard when I first was pointed to it - active, clean, nice interface, and originally an MS project.  However, after attempting to use it all I can say is that I see over-complexity built in everywhere, to the extent that it cannot even do basic CMS tasks.  Great.  Your documentation is sorely lacking (and in a lot of cases not reflecting the current release at all), not written with a newcomer in mind, so Im not even going to try and endear myself with the codebase.

I didn't come here intending to get into a heated debate, so apologies that this has turned into one, but I'm off to find a better alternative.  I hoped that Orchard had it for me, but it doesn't for so many reasons.


Apr 1, 2012 at 2:49 AM

Fine. This is not the CMS for you.

(FWIW, I feel talked down too as well when you come here and explain to me what Orchard should be and that it fails miserably. A few people seem to disagree with you)

Apr 1, 2012 at 11:14 AM
Edited Apr 1, 2012 at 11:14 AM
RichardPrice wrote:

What I want to do is not completely stupid - multiple content areas on a page, with the ability to enter information for each content area on each page instance.  

It's something I had been looking for as well when I first started using Orchard.

As it turns out, the only limitation to do so without having to write code is that Placement can currently only be used to position shapes in local zones (zones within the content item itself, as oppposed to the "global" zones, which are zones on the entire layout).

If I understood correctly, one of the features being considered to be part of 1.5 is that will support pushing shapes to arbitrary zones (I believe randompete is experimenting with this). Another feature that is under consideration is being able to edit Placement via the Admin.
With these two features, you will be able to do what you want easily without having to write a single line of code.

I'm aware that all this isn't helpful for you right now, but since you are trying out Orchard instead of using a CMS you're already familiar with, I thought it would be helpful to point out that "pushing shapes to arbitrary zones using" is probably going to be implemented in the next release.

With that feature in place, you will then be able to create for example a "PageV2" content type, that consists of multiple HTML fields, whose shapes you assign to any zone in your layout.

Apr 1, 2012 at 10:21 PM
Edited Apr 1, 2012 at 10:22 PM

Richard, I don't believe in stupid questions.
What exactly do you mean with content A and content B? I mean, you can do a lot with (html) widgets, especially the projection widget. Place them in any zone you want. What do you want inside the sidebar?

Orchard is not a system like for instance DotNetNuke. The beauty and strenght comes from the ability to let modules work together (with or without them knowing each other) to compose a specific, realistic content type for your business domain. For a DotNetNuke module, you're completly dependent on what that single module is offering you. (I'm just naming a CMS I'm familiar with)

Orchard is very flexible, you have to get your head around. And around again probably. Persevere and I think you will grow to love it. :-)