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
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?
i believe it's `SaveAndPublishBranch' now.
/// Saves and publishes a document branch.
/// <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>
/// <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>
IEnumerable<PublishResult> SaveAndPublishBranch(IContent content, bool force, string culture = "*", int userId = Constants.Security.SuperUserId);
By the way, How it does in Umbraco 7? :)
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted