More in this section

News Status

2 posts, 1 answered
  1. Stuart
    Stuart avatar
    9 posts
    18 Jul 2007
    10 May 2010
    Link to this post

    I am trying to get a news article status and when I use the following code...

    NewsItemPreview itemPreview = (NewsItemPreview) this.Parent.Parent;
    Guid contentID = new Guid(CmsHttpRequest.Current.QueryStirng[itemPreview.ParameterKey]);

    It gives me the previous status Published when in fact it is in ForApproval status.  How would I code that?

    On the main news module page, it shows a column status, that is the status I want to access.

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    11 May 2010
    Link to this post
    Hi Greg,

    Try using the code shown below

    StagedContent content = itemPreview.Manager.GetCurrentState(contentID);
    var actualContent = new SimpleContentItem(content, new string[] { });

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
2 posts, 1 answered