Image Field Projection Filter & Orchard.Fields

Jan 8, 2012 at 12:26 AM
Edited Jan 8, 2012 at 12:30 AM

I've created a content part called thumbs which is  just an image field and so far only added that part to the blog post content type. I've also created a projection query to filter posts based on a particular term... I want to display only the thumbnail image in my projection but there are no selectable properties within the projector view > add properties "properties".

So is there a way to include the image field images in a projection?

And is this module going to be added to the orchard.fields module and eventually the core? If not would be the best practice method for adding images to content?


Mar 14, 2012 at 7:35 AM

Second this, I'm in the exact same boat...I'm suprised this hasn't popped up more often than it has -- 'nxtjv', what was your solution in the end? Thanks pg

Mar 14, 2012 at 8:33 AM

@pubgrub I haven't found a solution as of yet, but I haven't tested with the latest revs since I've been busy with other projects and a lot of snowboarding. My only orchard site right now is but I should be launching a few more in the coming weeks. I'll let you know if I figure something out.

Mar 14, 2012 at 10:20 PM

Hey mate, add this to the ‘ImageFieldDriver’:

protected override void Describe(DescribeMembersContext context)

               .Member(null, typeof(string), T("FileName"), T("The File Name of the media."));


Hopefully this will give you more time with the gnar – very jealous!

Mar 18, 2012 at 3:26 AM

Hmm, not much of a solution really, for the whole point of using projections for me was to use its layout feature; this fix doesn’t display the image obviously, rather, you still have to create a view to wrap image html around the filename. Hopefully image field gets an update soon? Cheers pg

Sep 3, 2012 at 1:31 PM

I'm bumping this thread because I'm having the exact same problem as the topicstarter and there still doesn't seem to be a solution. 

@nxtjv and @pubgrub, have any of you found a solution yet?

Sep 3, 2012 at 6:46 PM

Hi Walace,

In the projection query I used on I selected  the Rewrite Output option for the display and called the image with this tag:



So basically I added one Content property (the MLS number) and by rewriting the output was able to call whatever properties I wanted. Here's the entire rewritten output:

<article class="proj-summary-listing clearfix content-inner radius shadow">
<div class="proj-summary-image">
<a href="{Content.DisplayUrl}"><img src="{Content.Fields.ThumbnailPart.ThumbnailImage.Url.Absolute}" alt="Kelowna MLS{Content.Fields.RealEstateListing.MLS}" /></a>
<div class="proj-summary-info"><div class="proj-summary-qr"><img src="{Content.Fields.RealEstateListing.QRCode.Url.Absolute}" alt="{Content.Display.Text}" /></div>
<div class="proj-summary-detail"><h1><a href="{Content.DisplayUrl}">{Content.DisplayText}</a></h1><div class="divider margin0"></div>
<h2>{Content.Fields.RealEstateListing.Address}, {Content.Fields.RealEstateListing.City}, {Content.Fields.RealEstateListing.PostalCode}</h2>
MLS<sup>&reg;</sup>{Content.Fields.RealEstateListing.MLS} - {Content.Fields.RealEstateListing.Bedrooms} Bedrooms - {Content.Fields.RealEstateListing.Bathrooms} Bathrooms</p><h4>Lisitng Price: <span class="digit">${Content.Fields.RealEstateListing.Price}</span> - <a href="{Content.DisplayUrl}" class="more-link">View Details</a></h4></div>
<div class="clear"></div>
Hope this helps you out :)

Sep 6, 2012 at 2:32 PM

Sorry for the late response, but thanks you for the tip, I think it will help me out :). Although for now I am using the avatars module and that works too.