Live and Preview Configuration Cycle
The previous pages explained the different configuration elements of the HST configuration. We pretty much discussed all the node types using a running configuration example. Also the previous pages frequently mention the Channel Manager and Channel Editor to add new channels and modify existing channels in a runtime production environment.
However they did not yet explain how it works with respect to:
- Making changes to a channel without having them directly live
- Working with multiple webmasters concurrently within the same channel.
Preview configuration
In general, in a production environment, there is always a preview configuration for a channel, unless there have not yet been any webmasters that started editing the channel. This typically is the case only after the first deploy or just or after first creation of a new site from a blueprint. In that case, the relevant configuration parts for site example are as follows:
Configuration with no preview yet:
+ hst:hst + hst:channels | + example + hst:configurations | + example + hst:hosts | + dev-localhost | + localhost | + hst:root + hst:sites + example
When a webmaster starts editing the site example through the Channel Editor, after they click on [Edit Channel] the live configuration gets cloned to have a separate preview configuration:
Configuration with preview:
+ hst:hst + hst:channels | + example | + example-preview + hst:configurations | + example | + example-preview + hst:hosts | + dev-localhost | + localhost | + hst:root + hst:sites + example
Above can be seen, that below the hst:hosts or hst:sites nothing changes as a result of creating a preview.(note that in 7.8.x and earlier version, there used to be a hst:sites/example-preview site node. This node is not needed any more in 7.9.0 and when present, it is simply ignored). What has been added are a preview for
- hst:channels/example-preview
- hst:configurations/example-preview
All changes the webmaster now makes through the Channel Editor end up below one of the above preview nodes. A change results in certain parts of the configuration parts getting locked by that webmaster. Since only parts of a channel configuration get locked, multiple webmasters can work in one and the same channel concurrently. Note thus that there is 1 preview configuration shared by all webmasters and other CMS users who can preview a document.
After a webmaster has made changes, they can
- Publish changes, in which case their preview changes become live. In the stored HST configuration this effectively means that :
- Locks from the webmaster are removed
- Changed preview configuration is copied to the live configuration
- Discard changes, in which case their preview changes are deleted. In the stored hst configuration this effectively means that :
- Locks from the webmaster are removed
- Changed preview configuration is removed
Locking:
Locking of configuration nodes differ per configuration section and whether the nodes are in the hst:workspace or not. See chapter Locking for more details.