开发者

Rendering latest content with custom template in Orchard CMS

开发者 https://www.devze.com 2023-03-31 06:03 出处:网络
I have a piece of content that is structured like this: Body Common Containable Route And it also contains an Image Field

I have a piece of content that is structured 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>

Obviously, I'm new to Orchard, and from reading other similar questions around the web I understand that perhaps I should be looking at the Placement.info file, however I'm unable to figure out how to use that in order to achieve 开发者_StackOverflow社区what I need (which is an image wrapped in an anchortag).


You should be able to do that by creating a file called Content-TheNameOfYourType.Summary.cshtml in the views folder of your theme.

0

精彩评论

暂无评论...
验证码 换一张
取 消