Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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! :)
Hi Elliott, I believe contentService.SaveAndPublishBranch(IContent, Boolean, String, Int32) is what you're looking for.
contentService.SaveAndPublishBranch(IContent, Boolean, String, Int32)
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_
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_
Thanks Owain! That's great!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
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! :)
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_
Thanks Owain! That's great!
is working on a reply...