About Working Copies

About Working Copies

When editors work on content with Scrivito, they actually manipulate pages (CMS objects) and the widgets and properties they have.

Editorial work is always done using a working copy which the editor finally publishes.

A working copy is a copy of the published CMS content, analogous to a new branch based on the master branch of a repository. To this copy editorial changes can be made without affecting the published content. Working copies are also convenient for testing page types (object classes) or their fields (attributes), for example.

Working copies are meant to ease editorial work on a particular subject or on particular website areas or structures. If several persons work on the same task, it is recommendable in most cases that they use the same working copy to accomplish this task. Individual editors can use working copies for their individual purposes, too.

To create a working copy via the Rails console, use:

This creates a working copy titled “Newsroom update” and makes it the current working copy, so that all subsequent Workspace API calls refer to it.

Publishing

When you've finished creating and editing the content of a working copy, it's time to publish it. This causes the working copy to replace the published content, which corresponds to the publicly visible website.

Publishing will only incorporate or renew the pages, images, etc. you altered in your working copy. That's why it's fast in those many cases in which only a couple of documents were touched. However, publishing a working copy into which a complete site has been imported by means of a migration might take some time.

Since several working copies may exist in parallel, the situation can arise that the same document has been or is being changed in more than one working copy. Scrivito does not prevent this, but it won't let you publish a working copy if someone has published an update to an object you've been working on, too. You need to solve such conflicts caused by intermediate changes first.

Working copies are updated automatically to keep them in sync with what has been published since they have been created.

Users and roles

Scrivito lets you add members to working copies. A working copy membership associates a Scrivito user with a particular role in a particular working copy. The role defines the privileges the users associated with it have, e.g. “read,” “write,” “publish.” Currently, there is only one role available, the “owners” role, which gives a user full control over the working copy.

When users edit content in place, they can only see those working copies they are a member of through their role.

Ownership

A CMS user who creates a working copy automatically becomes the first member of the new working copy. This member is automatically given the owner role. As an owner, you can add further owners to collaborate with them on your working copy. All owners may remove other owners from this list.

As a default, only owners can see their working copy as a selectable item in the in-place working copy menu. Owners may change content, and update, rename, or delete the working copy. You can change these defaults and fine-tune the access and publishing permissions by hooking up to the user interface provided by the Scrivito SDK.