Formatting of blog post summary in widget directly?

Topics: Customizing Orchard, Writing themes
Mar 15, 2012 at 1:09 AM

I'm runing v1.4 and have created a content type called ManagersListWidget.  It's a widget and is structured as follows:

      <ManagersListWidget Stereotype="Widget" DisplayName="Managers List Widget">
        <RecentBlogPostsPart />
        <IdentityPart />
        <CommonPart />
        <WidgetPart />
        <ManagersListWidget />

It also has a Title and body.

The goal is to point the widget at a blog with a list of people in which they are displayed within the widget in a list with each blog post display it's very small image and the title.

So I've created a view for the widget called "Widget-ManagersListWidget.cshtml" and I'm trying to figure out how to display:


foreach blog post:

Rather than generally allowing the content type under neath to draw itself by calling Display(Model.ContentItems), I'm wanting to basically hijack the list and draw it myself in the high level widget item where I create a ~100px wide div for each element with the image and title.

How exactly would I go about this?

 I would like to do something like this:


var items = Model.ContentItem.ManagersList.Items
//these are actually blog posts

foreach(var item in items)


//format div for image url




Mar 15, 2012 at 6:11 AM