Publish items in Sitecore programmatically using API

In Some scenarios if you would like to publish items in Sitecore programmatically using API from Master DB to web or pub Database then we can use the Sitecore Publishing API.

Sitecore has different types of publishing like Incremental, Full Publish, Single Item, Smart Publish. Use PublishMode in the publish options method to specify the type of the publish you need to achieve. If you choose Incremental publish mechanism you cannot set a root item as all items in the publish queue is published. Below is the sample code to publish an item.

Sample Code to  publish items in Sitecore programmatically using API

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *