+1-888-365-2779
Try Now
More in this section

Forums / Sitefinity SDK / Broken image, retrieve Generic Content:

Broken image, retrieve Generic Content:

2 posts, 0 answered
  1. Taha
    Taha avatar
    6 posts
    Registered:
    02 Mar 2011
    10 May 2011
    Link to this post
    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);
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    12 May 2011
    Link to this post
    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 >>

2 posts, 0 answered