Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • John Churchley 272 posts 1257 karma points c-trib
    Sep 24, 2015 @ 10:16
    John Churchley
    0

    Check if Content Node is Published

    Hi,

    Anyone have any ideas on how to check if a content node is published currently I'm getting a "Object reference not set to an instance of an object." I try to pass in the node id of an unpublished page into Umbraco.TypedContent(nodeid)

  • John Churchley 272 posts 1257 karma points c-trib
    Sep 24, 2015 @ 10:19
    John Churchley
    100

    Solution was to check the UmbracoTypedContent was not null

    listofpageids.Where(x => Umbraco.TypedContent(x.id) != null).OrderBy(x => Umbraco.TypedContent(x.ChildId).AncestorOrSelf(1).Position()

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies