Rendering lists in content alternate

Topics: Writing themes
Nov 27, 2013 at 12:27 AM
Edited Nov 28, 2013 at 9:42 AM
Hey there,

I have a custom content type that is a container - CustomPage
I have another content type that is containable - ItemPage

I've created the following alterantes:
  • for Content: Content-CustomPage,
  • for ContainerPart: Parts.Container.Containable-CustomPage,
  • for ItemPage summary: Content-ItemPage.Summary
I've connected the ContainerPart alternate with the ItemPage summary alternate and everything renders ok. My problem is connecting the Content alternate to the ContainerPart

I know that the default Content renderer with some magic calls the default ContainerPart renderer but I can't figure out how.

This question was also put on http://orchard.codeplex.com/discussions/285039 but I didn't really understand the solution.

I want to do something like
@Display(GetShape(Model.ContentItem.ContainerPart))
but I can't figure out how.

I've tried something like this with no luck
var shape = BuildDisplay(Model.ContentItem.ContainerPart);  
Thanks