Search code examples
orchardcmsprojector

Orchard CMS display image from MediaPicker using Projector


I have a content type with a MediaPicker field in it. The MediaPicker allows the contributor to select an image for the content type. I'm using Projector to develop a page that renders a list of this content type, but the image doesn't display. I modified the "Rewrite Results" in the layouts for the Projector to write the field to an image: <img src="{Text}"/>

But this produces: <img src="~/Media/.../picture.jpg"/> and doesn't convert the tilde ~/ to the correct path.

Can you tell me what I'm doing wrong? What is the best way to render an image using the Projector module?

Thanks!


Solution

  • I posted on my blog a solution that resolves this issue:

    http://coderkelly.wordpress.com/2012/04/18/solved-projector-module-layout-to-display-media-picker-field-as-image/