Featured image for blog posts?

Topics: Administration, Core, Customizing Orchard, General, Troubleshooting
Jun 30, 2014 at 9:32 AM
Edited Jun 30, 2014 at 9:33 AM
I'm looking for a way to attach an image to a blog post (not include it directly into the blog post "body") that will then show up on the blog page/listing. Like in this example:

Image

I think this is pretty much a standard feature of blog systems nowadays, but I can't seem to find the option/button/module to activate it. Please help.
Developer
Jun 30, 2014 at 11:27 AM
Attach a MediaLibraryPicker Field to the BlogPost content type?


Jun 30, 2014 at 12:48 PM
Thank you for your reply. I have added the MediaLibraryPicker Field to the BlogPost content type and now can see the attached image on the blog post itself, not on the blog list though. This is exactly the wrong way I want it to be.

Could you please explain to me
a) how to prevent the new field to show up on the actual blog post page, and
b) how to embedd the image from the new field in the blog listing?

This is the Views/Content.Summary.cshtml i created for my theme so far:
@using Orchard.Utility.Extensions;
@{
    var contentTypeClassName = ((string)Model.ContentItem.ContentType).HtmlClassify();
}

    <div class="blog_entry" style="display: flex; flex-direction: row; flex: 0 0 auto;">
        <div class="blog_entry_image" style="display: flex; flex-direction: row; flex: 0 0 auto;">
            [IMAGE GOES HERE]
        </div>
        <div class="blog_entry_text style="display: flex; flex-direction: column; flex: 0 0 auto;">
            <div class="blog_entry_abstract style="display: flex; flex-direction: column; flex: 0 0 auto;">
                @Display(Model.Header)
                @Display(Model.Meta)
                @Display(Model.Content)
            </div>
            <div class="blog_entry_footer">
                <div>@Display(Model.Footer)</div>
            </div>
        </div>
    </div>
Thank you for your help
Jul 1, 2014 at 11:29 AM
Edited Jul 1, 2014 at 11:30 AM
Use the placement.info file, that tells to display the Image in the summary view, but not in the details.
<Match DisplayType="Summary">
  <Place Fields_MediaPicker="Content:1"/>
</Match>