Jan 8, 2014 at 10:45 PM
Edited Jan 8, 2014 at 10:53 PM
I wasn't able to get that cshtml file format to work. I used Content-ProjectionPage.Details.cshtml. Then because I had no idea what the Model contained. I used reflection to list properties on the page until I figured out that the Model contains 3 shapes.
The first is empty, the second is the pager, and the third is the list. It seems like a bad hack but I now have the pager displaying first.
Is there a better way?
How can I know what the Model contains in each context? Also now I'm going to need to format the list. I know Pager.cshtml works for the pager. I'm not sure if I'm missing some documentation somewhere but this all has been very difficult to figure out.
var title = WorkContext.Resolve<IContentManager>().GetItemMetadata((IContent) Model.ContentItem).DisplayText;
var contentTypeClassName = ((string)Model.ContentItem.ContentType).HtmlClassify();
var pager = Model.Content.Items;
var items = Model.Content.Items;
<div class="moduleContentMain @contentTypeClassName"> <h3>@title</h3> @Display(pager); @Display(items); </div>