Rendering latest content with custom template

Topics: Customizing Orchard, Writing themes
Aug 29, 2011 at 1:26 PM

I have a piece of content that is tructured like this:

  • Body
  • Common
  • Containable
  • Route

And it also contains an Image Field

What I'm trying to do is display a summary on my landingpage containing only the Url and the Image Field Url (url the uploaded image), something like this.

<a href="@Model.Path"><img src="@Model.Image.FileName" /></a>

Obiously I'm new to orchard, and from reading other similar questions around the web I understand that prehaps I should be looking at the file, however I'm unable to figure out how to use that in order to achieve what I need (wich is an image wrapped in an anchortag).

Aug 29, 2011 at 8:39 PM

You probably just need to override the summary template for that content type. Look for existing summary templates for examples, and also turn on shape tracing in order to discover what alternates you can use to target this to just your content type.