Retrieving related images from News item in code

Posted by Community Admin on 04-Aug-2018 19:44

Retrieving related images from News item in code

All Replies

Posted by Community Admin on 23-May-2014 00:00

I have a custom field added to the News module called RelatedImage. It's a related media type, single image. How can I get a link to that image for use in an img tag from my News content item?

NewsItem news = newsManager.GetNewsItem(new Guid(myguid));

news.GetValue("RelatedImage") returns null for every piece of News. Is there a different way I should be retrieving that field?

This thread is closed