This project is read-only.

Displaying Content type items in different Zones?

Topics: Troubleshooting
Apr 25, 2012 at 5:20 AM
Edited Apr 25, 2012 at 6:11 AM

Hey guys, I’ve manually created a content type and added a whole host of fields to it which I wish to display in a couple of different zones on one page, as per:

but being that I’ve manually done the above I don’t have the luxury of editing a driver. I have tried to achieve what I want with the, but when I specify different zones for certain fields, nothing gets displayed [for I believe file describes the local zones only ?] The only way I’ve managed to get something like what I’m after is to make some templates stipulating my own zones @Display(model.Side) etc.; problem is, I also want to add a widget to this page in the generic ContentAside zone, which then throws my templates out of whack? Has anyone achieved this, I thought it would be fairly simple, so I assume I’m going about it in the wrong way. Thanks for any suggestions in advance, Dyr

Apr 25, 2012 at 7:56 AM

Use a handler, or a shape table provider.

Apr 25, 2012 at 9:34 AM

Ok, just so we're clear, I wish to achieve the following (I’m not doubting you’ve not grasped what I’m trying to achieve, more a case of – whether I’ve explained myself correctly).

If this is the case, it seem excessive to have to create, I assume a custom IShapeTableProvider for such a scenario. If not, do you know of any examples other than CoreShapes to achieve such, as I have looked at that code and it’s truly not making sense to me?

I looked at:

but still can't grasp how to go about the above scenario. Thanks for some further pointers/suggestions, Cheers Dyr

Apr 25, 2012 at 6:14 PM

It may be excessive but that's the way it is right now. We'll probably have a better story in 1.5.

Apr 25, 2012 at 6:14 PM

What about widgets?

Apr 25, 2012 at 7:27 PM

Additionally, you could:

  • Contact randompete regarding his modification to processing. He made it possible to push shapes to arbitrary theme zones from Placement. See his tutorial
  • Check out my Content Widgets module, maybe it will be of use for you.
Apr 25, 2012 at 10:59 PM

Thanks ever so much for your help guys, before going to bed last night, I did indeed use randompete’s code; ‘one word, BRILLIANT’!

@bertrandleyroy, please tell me his code/version of – will be committed to the core in 1.5, it seems to be an issue regularly re-invented by many coders? Also, I do need to look into Shape Provider so I can wrap a div around some of the ContentAside elements, but maybe randompete has this covered as well – need to investigate further.

@Piedone, hey – thanks for your module link, I’ll definitely check it out ;) Again, thanks to you both for your time and efforts, Cheers Dyr

Apr 25, 2012 at 11:54 PM

Not sure re-invention really is a problem with Orchard? Yes, we'll absolutely look at Pete's code when we look at that aspect of 1.5.