This project is read-only.

Body Summary - use image as 'More' link

Topics: Customizing Orchard, Writing themes
Sep 28, 2016 at 10:26 AM
Edited Sep 28, 2016 at 10:40 AM
I'm customising a theme and slowly getting my head round different things in Orchard, but I want to be able to use an image as the 'more' link when displaying the summary of a blog post. So I'm trying to customise the line:
<p>@body @Html.ItemDisplayLink(T("more").ToString(), contentItem) @contentItem</p>
Instead of more , I want to use something like <img src="button.png" />, but putting this in will encode the characters.

I'm guessing that I need to use a method other than .ToString(), but ASP MVC is quite new to me at the moment, so I can't even find the terminology that I should be searching for on Google yet.
Sep 28, 2016 at 3:42 PM
Edited Sep 28, 2016 at 3:43 PM
You could do this:
   <a href="@Url.ItemDisplayUrl(contentItem)"><img src="..." /></a>
Marked as answer by laurencemadill on 9/28/2016 at 9:35 AM
Sep 28, 2016 at 5:35 PM
That's perfect. Exactly what I needed, thanks very much