Copied to clipboard

Flag this post as spam?

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


  • Sam 26 posts 137 karma points c-trib
    Oct 22, 2015 @ 02:30
    Sam
    0

    Get IPublishedContent from IContent after publish

    Hi gang,

    Not sure if this is the right forum, so let me know if not.

    I am creating some content using ContentService and then publishing it with PublishWithStatus

    Once this is complete I get a status to tell me if it succeeded or not.

    After the publish has finished, how can I get the IPublishedContent version of the content?

    Thanks, Sam

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Oct 22, 2015 @ 02:32
    Nicholas Westby
    101

    When you create an IContent, it should have an ID (maybe after saving/publishing... I forget). That is the ID of the node. You should then be able to use UmbracoHelper.TypedContent to get the IPublishedContent version by passing in that node ID.

  • Sam 26 posts 137 karma points c-trib
    Oct 22, 2015 @ 02:56
    Sam
    0

    OK cool.

    Thats what I have been doing but I wanted to make sure there wasn't a better way :)

    Thanks

Please Sign in or register to post replies

Write your reply to:

Draft