Dramatically Different Rendering of Blog Summaries on same page?

Topics: Customizing Orchard, Writing themes
Mar 4, 2012 at 10:33 PM

Okay, I have two "RecentBlogPostWidgets" on the same page.  One will point at a blog that has an enum of "Managers" attached to the Blog (not the post) and is really a listing of people that I intent to have it display the image (larger) along with the title which is their first and last name.  The second has an enum of "Stories" and is more of a traditional blog summary where it will show a smaller image with title text and read more etc.

In the past (v1.3) my widget really just told the list of BlogPosts to render themselves so in this case BlogPost.Summary.cshtml did all the heavy lifting.  If I had different summary views, they were always on separate pages so url alternates came to the rescue. 

In this case my existing knowledge of tricks do not work for me because even with url alterates, in this case the URL alternate is the same since they are both displayed on the same page.

Is there something I missed in v1.3 or new in v1.4 that would help me with this?  Basically I want to have a content type that I can call what ever I want then use theming for that name to style it as I wish.  I want the content type to take over complete control for the rendering of the list of items under it and inside the cshtml it would do the foreach and render the proper HTML for each type using the parts and fields accessible.

Thanks for any advice.

 

Developer
Mar 5, 2012 at 7:54 PM

I think you could use the Widgets alternate here. If that doesn't suffice, then you might go ahead an create some queries and projections, displayed as widgets. Per projection you will be able to specify a (custom) display type, which can be used to name the summary view of your content items, effectively allowing you to take over the rendering of each content item. I haven't tried this out though, but it I'm sure it can be done.