Containers as pages

Topics: Customizing Orchard
Jun 10, 2011 at 1:20 PM

Feels like I'm spamming this board. :)


When i'm trying to use a ContentType that has the Container-part added and a Route-part, the items are not listed when going to that route - only if I have a Body-part is there anything shown (not the contained items however). Is this expected behavior? How do I push the contained items to a summary list on that ContentItem ?

Jun 11, 2011 at 1:53 AM

Do you have Common?

Jun 12, 2011 at 7:45 AM

Yes, I have Common, Container, Route and Body.

Jun 12, 2011 at 7:52 AM

Only if you have a body part on what content type?

Jun 13, 2011 at 5:16 AM

Don't know if I understand you correctly, but only the "body" (that is, the html-field provided by the Body content part) is shown on the route. The content type is a custom one that I created for this purpose.

Jun 13, 2011 at 5:26 AM

Still not clear what you are trying to do. So you have a type that has container, common, route and body. You said "only if I have a body is there anything shown". You did not say what the type of the contained items was, what parts they have, and what exactly you expected to happen.

Jun 13, 2011 at 6:49 AM

Ah, sorry.

Only the body-part is shown on that route - even if there are contained items they do not show up at all. Basically I want a page type that has a title, a heading with some explaination and a list of items. At the moment I am only getting the title and the heading.

Jun 13, 2011 at 6:50 AM

Weird, usually it's the opposite of the. Enable shape tracing and look at the templates involved.

Jun 13, 2011 at 7:14 AM

Hm. I'm actually not getting any shapes at all. It's all blank. I tried adding a normal list with items (also custom content types "articles" with: Body, Common, Containable, Identity, Route and Authorization - which is my own part for handling viewing permissions). I also tried to remove Authorization to see if that messed up anything - but it's the same result.

If i added the pager i do get a shape for pager though, but it is blank and listing no items.

Jun 13, 2011 at 7:45 AM

You need to fix that first. If shape tracing is not working, something weird is going on that needs fixing. If I understood correctly what you wrote.

Jun 13, 2011 at 8:19 AM

I am getting the traces - but there is no hint of there being any shapes existing for the Container-part - except for the Pager.

Jun 13, 2011 at 10:46 PM

OK, now I see exactly what you mean. I can reproduce. I'll keep you posted but I think it's just a matter of adding some placement.

Jun 13, 2011 at 10:55 PM

Yeah, I got it to work with the following in my

<Match ContentType="Pages">
  <Place Parts_Container="Body:2"/>

(replace Pages with the name of your own content type)

Jun 14, 2011 at 10:30 AM

Perfect! Yep, got it working as well. Thanks!