Broken image, retrieve Generic Content:

Posted by Community Admin on 05-Aug-2018 16:04

Broken image, retrieve Generic Content:

All Replies

Posted by Community Admin on 10-May-2011 00:00

Broken image, retrieve Generic Content:

Am trying to retrieve Generic Content, but the problem is that the images in it do not show (broken path).
How do I get the HTML out to point to the right path?!
  
This is how I get the content. 

            ContentItem  g_items = App.WorkWith().ContentItems()                           
                           .Where(nI => nI.Status == Telerik.Sitefinity.GenericContent.Model.ContentLifecycleStatus.Live)
                           .OrderBy(nI => nI.DateCreated)
                           .Get().Single();


            Response.Write(g_items.Content);

Posted by Community Admin on 12-May-2011 00:00

Hi Taha,

I made a simple test and the image correctly appears at my end.

var contentBlocksManager = ContentManager.GetManager();
            var item = contentBlocksManager.GetItems<ContentItem>().Where(cnt => cnt.Status == ContentLifecycleStatus.Live).First();
            var ht = item.Content;
            var lit = new Literal();
            lit.Text = ht;
            Controls.Add(lit);


Best wishes,
Ivan Dimitrov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

This thread is closed