Add simple image to news post
I feel like I'm missing something very simple here. I just want to add an image to my news template. If I use the insert code to the right of the template, I get the whole sf:Imagesview control. This creates a header and lost of extra code that I don't need. I just want the image associated with the news item.
I tried:
<asp:Image ID="test" Url="<%# Eval('Image')%>" runat="server" />
But I get an "error parsing template" message.
Hello Amanda,
Thank you for contacting us.
The behavior you are noticing is normal. This is due to the fact that the default news item list template uses Telerik's RadTreeView control which does not have an <asp> tag available in its implementation. I am afraid you need to use the ImagesView inside your ItemTemplate tag in order to get the custom related media field on your template. This is done with the intention of improving your performance as this way the item does not need to be queried every time the control loads.
If the markup you get is not to your liking you can always bind your news items to a custom widget and/or repeater and show the news' properties there.
I hope this information is useful. Feel free to get back to us if further information is needed.
Regards,
Ivan D. Dimitrov
Telerik