I have a nice summary view for my blog, but want my recent blog posts to have a different, more compact view. I am trying to use BuildDisplay with the "Short" display type, and have my placement.info setup right, but am not sure the best way
to modify Parts.Blogs.RecentBlogPosts.cshtml to make this work.
Some examples of customized Display types and rendering the same content beyond Edit, Admin, Summary, Detail would be helpful.
This works (partially) in my Parts.Blogs.RecentBlogPosts.cshtml:
@foreach (var item in Model.ContentItems.ContentItems.Items)
The first issue I have with this is it seems to have too much knowledge of the Model, that I know the first level is a list, and that list has ContentItems which cannot be passed to BuildDisplay as they are not IContent it seems. Some objects with name ContentItem
seem to work with BuildDisplay and other don't. Model.ContentItems.ContentItems.Items doesn't work either, but item.ContentItem does.
Second, I have a specialized Parts.Common.Metadata.Short.cshtml that I would like to be invoked, but it doesn't seem the display type is recursive.
Ideally, my template would be just this:
Or, better yet I would just be able to select a display type when I add the widget to the layer in the widget config page. If I figure out how to do that at all, I might do that and contribute back.
BTW, the shape tracing tools have not been much help, the model is not complete and it is hard to see what shapes were actually involved in rendering this view. The placement.info is a nice idea and when the shape tracing works it is not so bad, but often I
find myself fiddling with stuff a long time to make something show up on the screen. Especially when there is a hierarchy here... how do I tell the main shape Parts.Blogs.RecentBlogPosts that the List shape inside should render each shape inside with my "Short"
display type. I am new to Orchard but not found much help on troubleshooting techniques on interplay between placement.info and templates, and how to trace when shape tracing doesn't do the trick. I know I might be missing something but this seems a bit too