Mozaik

Documents and content editing

How to create and edit content in Mozaik

Written by Peter Balazs

Last updated: 23/07/2018

There are four main document statuses:

  • Draft
  • Timed
  • Published
  • Archived

Mozaik supports document versioning, and a document version can have the following statuses:

  • Draft
  • Timed
  • Published

When querying documents through the API it will return only the documents with Published status by default.

Versioning

A new document version is created every time a Published document is modified. However when a document version is in Draft or Timed status the content will be overwritten on update.

Edit history

Mozaik always keeps the full edit history. Although the content of a document version in Draft or Timed status is overwritten on update, the previous versions are still saved.

Publishing workflow

Since Mozaik supports document versioning, it comes with a simple publishing workflow as well. There are eight operations for documents:

  • Create a document
  • Update a document
  • Schedule a document for publishing
  • Publish a document
  • Unpublish a document
  • Archive a document
  • Unarchive a document
  • Revert document to the previous version

When a new document is created it gets into Draft status. A document cannot be created and published at the same time. Saving updates to a draft document updates that version, but all edit history is kept for every version.

When a document is in draft status it can be either scheduled for publishing (when this happens the document status is changed to Timed) or publish immediately (document status is changed to Published).

Saving changes to a published document doesn't effect the live content of your document but creates a new document version in Draft status. If you are happy with your changes you can simply publish the new version.

Unpublishing a document

A document can be unpublished. It changes the document status to draft, and it won't be returned in the document queries.

Archiving a document

Documents cannot be deleted at the moment, but they can be archived. When a document is in Archived status, it is not returned in the document queries. All versions and edit history are kept.

Unarchiving a document

An archived document can be unarchived. When it happens the main document status becomes Published if there was a Published version at any point in time, and becomes Draft if there was none.

Revert document to the previous version

If a document is in Published status and the latest version is Published too, it can be reverted to the previous published version. When it happens the current version becomes a draft and the previous version becomes the live version again.