I have a number of content types (which are pages containing more content types) which need to be displayed within an accordion jquery control. Using custom shapes and a projection I have the vanilla version working as:
var buildShapes = Model.BuildShapes;
@foreach (dynamic shape in buildShapes())
This works really nicely. I now need to produce multiple accordions, each with a title, based upon a category held within the projection query results (the individual query type).
I would prefer to do this within the single projection and have the code which will layout the separate accordions based upon each category. This requires me to loop through each contentitem in the projection using (I loop through the partner list)
IEnumerable<object> partners = Model.ContentItems;
What I have been struggling with is drawing the final summary shape, i.e. the content item (partners[x]). The vanilla example uses the very sexy @Display(shape) which handles everything I need to do.
I find I am unable to enumerate the Model.Buildshapes, or pass the contentitem in a way that is similar.
Has anyone a view on how to access the contentitem shape I need to pass to the Display call, or the similar functionality as this, but using the contentitem?