Container within a Container doesn't display

Topics: Customizing Orchard
Mar 20, 2012 at 10:50 AM

I have a Container in my Page, which contains Products.  These display correctly.  However, if I then add a container to my Products to list Product Images (another custom type), these aren't displayed with the default template.

I'd happily (and ideally) create a custom template to list out the Product Images, but I can't find the items in the Model.  All I can see by using the Model inspector is the ContainerPart, which contains some details on the type to be contained, but no actual item data that I can loop through?

Can anyone shed some light here, please??!  This has been driving me crazy for a while now!

Mar 21, 2012 at 2:01 PM
Edited Mar 21, 2012 at 2:05 PM

Bump... can anyone help with this? I figure this ultimately may overlap with another of my questions - if I can find where in the Model the list of items is held, then I can easily create an alternate template.  I've looked throughout the Model inspector and can't find any such list.  Of course, this doesn't explain the nested container not displaying, but that doesn't bother me if I can do so with alternates.

Thanks in advance...

Coordinator
Mar 21, 2012 at 9:51 PM

What version of Orchard is that?

Mar 22, 2012 at 8:01 AM

The latest - 1.4.0.0

Coordinator
Mar 23, 2012 at 9:25 PM

If you look at ContainerPartDriver, you'll see that it creates a shape called Parts_Container_Contained that itself has a List shape and a Pager shape.

Apr 16, 2012 at 5:04 PM

Sorry, I think I'm being a bit slow here, but I'm still not clear as to how I can re-template my Product Images listing, and access the model data to do so...

Could you clarify as to what I need to be doing here?  I've read all the relevant docs but it's not making sense for this scenario.

Thanks again.

Apr 19, 2012 at 1:24 PM

Bump again... any clues here?  Thanks.

Coordinator
Apr 19, 2012 at 6:44 PM

I don't know either. You didn't give enough details about what you tried and how it failed. Maybe my best guess would be to try to create a specialized part and prepare as much as you can from the driver so the template can just render the data without causing new database queries.