title: Custom View For RecentBlogPosts in Orchard
body: <p>I've been searching and trying for 2 days to change the view for the RecentBlogPosts content type that appears on my homepage. I want to display the title and a phrase from the posts. </p>
  
  <p>I have managed to find a view that shows the title for each post, but I haven't managed to figure out what the other parts in the Model are named or how to extract the text. </p>
  
  <p>Help will be GREATLY appreciated ! </p>
  
  <pre><code>@using Orchard.ContentManagement;
  @using Orchard.Core.Routable.Models;
  @using Contrib.Hyperlink.Fields;
  @{
  
  
    IEnumerable&lt;object&gt; blogPosts = Model.ContentItems.ContentItems;
  }
  @if (blogPosts == null || blogPosts.Count() &lt; 1)
  {
      &lt;p&gt;@T("No posts.")&lt;/p&gt;
  }
  else
  {
     &lt;div class="content-items"&gt;
     @foreach (dynamic post in blogPosts)
     {
              string title = post.Title;
              ContentItem item = post.ContentItem;
  
     &lt;div class="blogpost" style="width: 300px; padding-left: 15px; float: left;"&gt;
           &lt;p class="content-item-summary"&gt;@Html.ItemDisplayLink(title, item)&lt;/p&gt;
     &lt;/div&gt;
  
     }
     &lt;/div&gt;
  }
  </code></pre>
  
  <p>The above code was (mainly) from <a href="https://stackoverflow.com/users/363821/bertrand-le-roy">Bertrand Le Roy</a>'s <a href="http://weblogs.asp.net/bleroy/" rel="nofollow noreferrer">blog</a>, for which I thank him.</p>