Copied to clipboard

Flag this post as spam?

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


  • Elliott Brown 41 posts 211 karma points
    Aug 20, 2021 @ 10:40
    Elliott Brown
    0

    Version 8 equivalent of contentService.PublishWithChildrenWithStatus

    Hi,

    I'm in the process of upgrading our solution from v7 to v8 and I'm trying to find a replacement for contentService.PublishWithChildrenWithStatus()

    I can of course loop through the children of the node I'm publishing but it seems strange that this function no longer exists -

    can any one shed some light on this - Thanks! :)

  • Owain Jones 65 posts 437 karma points MVP 4x c-trib
    Aug 20, 2021 @ 15:46
    Owain Jones
    100

    Hi Elliott, I believe contentService.SaveAndPublishBranch(IContent, Boolean, String, Int32) is what you're looking for.

    Here's a link to it in the API Docs: https://our.umbraco.com/apidocs/v8/csharp/api/Umbraco.Core.Services.IContentService.html#UmbracoCoreServicesIContentServiceSaveAndPublishBranchUmbracoCoreModelsIContentSystemBooleanSystemStringSystemInt32_

    Edit: The underscores seem to be getting stripped out of the link: https://our.umbraco.com/apidocs/v8/csharp/api/Umbraco.Core.Services.IContentService.html#Umbraco_Core_Services_IContentService_SaveAndPublishBranch_Umbraco_Core_Models_IContent_System_Boolean_System_String_System_Int32_

  • Elliott Brown 41 posts 211 karma points
    Aug 23, 2021 @ 07:42
    Elliott Brown
    0

    Thanks Owain! That's great!

  • 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