Skip to content

Unpublish

Unpublishes document from all previously published folders and returns current document instance

1
myDocument.Unpublish():Document

Unpublishes document from specified folders and returns current document instance.

1
myDocument.Unpublish(folderPath: string):Document

Parameters

string folderPath
    Path of folder(s)

Remarks

This method changes Document.State property to "Draft" and saves document.
If folderPath is specified, document is removed from specified folders. Path can be specified as full path. Non existing folders are ignored.

Example

1
2
3
4
var existingDocument = $Documents.Get(id);

// Unpublishing the document under Test\Documents folder path:
existingDocument.Unpublish('Test\Documents');

See Also