This project is read-only.

Access List Items in Container containing various ContentTypes

Topics: Customizing Orchard, Writing themes
Mar 15, 2012 at 10:14 PM


I'm writing some kind of Product presentation Page and i defined a ContentType "ProductCategory" - contains the Containable and the Container Part. I defined the Container to allow any item type to be added. 

In the Shape displaying the Content Item i'dlicke to retrieve the Contained Items - and render them in different locations in my view like:



var itemsOfTypeA = <???>
var itemsOfTypeB = <???>



@foreach( var item in itemsOfTypeA ) {

	// Render Item


... (some markup with properties) ..

@foreach( var item in itemsOfTypeB ) {

	// Render Item 




Using the ShapeTrace i managed to create the right .cshtml template (Content-ProductCategory.cshtml) to render my content type but i fail to retrive the data to display it.  

Thanks in advance or any help,




Mar 17, 2012 at 9:38 PM

Why don't you just use Taxonomies?

Mar 17, 2012 at 11:02 PM
Edited Mar 18, 2012 at 12:02 AM


Well, i do not know that they are usefull for that kind of problem - after watching your youtube video things are much clearer now. Thanks a lot for your really great work & Help.