Revisions and cultures
| Method | Does |
|---|---|
revisions(id) |
the node's versions in every culture: { id, enabled, items } |
createRevision(id, { revision?, type?, culture? }) |
copies one of its revisions into a new draft, or another type, in the same culture or another |
setRevisionType(id, revision, type) |
publishes, unpublishes or archives a revision; a published one replaces its culture's published one |
setRevisionCulture(id, revision, culture) |
moves a revision to another culture, '' for none |
deleteRevision(id, revision) |
deletes a revision, unless it is the last |
cultures(), addCulture(code, { site? }) |
the cultures content can be written in; adds one, optionally as a language of a site |
sites() |
the sites the user can read: { supported, types, items }, each item { id, name, type, cultures } |
To read or write one revision, name it in the context:
store.withContext({ revisions: { [id]: revision } }). A node you read says which version it is in
$revisionId, $revisionType and $culture, and which site it is in in $collection.