How do I use the Content Service to publish a node and all of its descendants in v8
Hi
In an Umbraco v8 site, I have a node which is published but it has many child nodes and descendants which are not yet published. I would like to use the content service to publish them all in one command.
/// <summary>
/// Saves and publishes a document branch.
/// </summary>
/// <param name="content">The root document.</param>
/// <param name="force">A value indicating whether to force-publish documents that are not already published.</param>
/// <param name="culture">A culture, or "*" for all cultures.</param>
/// <param name="userId">The identifier of the user performing the operation.</param>
/// <remarks>
/// <para>Unless specified, all cultures are re-published. Otherwise, one culture can be specified. To act on more
/// than one culture, see the other overloads of this method.</para>
/// <para>The <paramref name="force"/> parameter determines which documents are published. When <c>false</c>,
/// only those documents that are already published, are republished. When <c>true</c>, all documents are
/// published. The root of the branch is always published, regardless of <paramref name="force"/>.</para>
/// </remarks>
IEnumerable<PublishResult> SaveAndPublishBranch(IContent content, bool force, string culture = "*", int userId = Constants.Security.SuperUserId);
How do I use the Content Service to publish a node and all of its descendants in v8
Hi
In an Umbraco v8 site, I have a node which is published but it has many child nodes and descendants which are not yet published. I would like to use the content service to publish them all in one command.
How do I do this please?
Thanks
Paul
Hi Paul,
i believe it's `SaveAndPublishBranch' now.
By the way, How it does in Umbraco 7? :)
Thanks Kevin
is working on a reply...