I have a control that loads the news items with a Telerik.News.NewsManager using the item's GUID that comes from the URL.
I know this is not the best way to do that, but it's already implemented. And it works, unless we have some image inside the content of the news.
This is what I'm using to get the items:
Telerik.News.NewsManager newsManager =
Telerik.Cms.Engine.IContent thisContent = newsManager.Content.GetContent(contentId.Value);
Telerik.Cms.Engine.Data.CmsContentBase myBase = (Telerik.Cms.Engine.Data.CmsContentBase)thisContent;
lblNewsTitle.Text = myBase.GetMetaData(
lblNewsDate.Text = ((DateTime)myBase.GetMetaData(newsManager.PublicationDateField)).ToString(
"dd MMM yy"
lblContent.Text = myBase.Content.ToString();
contentId is a nullable Guid.
All I use is the Title, Publication Date and the Content. The problem is when I have an image in the content. Instead of having a url on the src of the tag <img>, what I have is something like this:
<img src="[Libraries]00000000-0000-0000-0000-000000000000" alt="whatever" />
Is that what really should happen when we access the news using the News Manager? Is there something that I can use from sitefinity to easily get the url of these images?