Update Document Templates

Overview

This page describes how to deploy new or updated document templates to a specific server environment, such as production.

Stakeholders

Developer

Prerequisites

Backward-Compatible Changes

Most content changes between releases involve backward-compatible updates to a document namespace. A document namespace defines the set of document templates available in Bloomreach Content. Typically, each project has a single, custom document namespace.

The following changes are considered backward-compatible:

  • Add a new document template.
  • Add a non-required primitive field to an existing document template.
  • Add a non-required compound field to an existing document template.

These changes do not affect existing documents:

  • New document templates do not impact existing documents because they are not used by them.
  • Adding a non-required field (primitive or compound) to an existing template does not change the structure of existing documents. The new field is optional, so existing documents remain valid. When you open an existing document in Bloomreach Content, the new field appears in the editing template. Any value entered in the new field is saved as expected.

You do not need to update existing documents when deploying a release that contains only backward-compatible changes as defined above.

Only the document namespace needs to be updated. The system automatically updates the modified namespace during deployment if bootstrapping is enabled.

Automatic Update

You can apply backward-compatible changes to a document namespace automatically when deploying a new release:

  1. Enable the Automatic Export feature in your development environment. This exports any changes to your namespace as XML in the repository-data/application module.
  2. Use the CMS UI in your development environment to modify the namespace.
  3. In your project's repository-data/application module, verify that the following YAML sources and resources are present:
    • The CND file for your namespace.
    • The exported YAML source for each added or modified document template.
  4. Commit the changes in the repository-data/application module to your version control system.
  5. Package the repository-data/application module with your release artifact.
  6. Deploy the release artifact to the target environment. Ensure that bootstrapping is enabled. The system detects the new namespace version and replaces the old namespace with the updated version.

Updating Existing Documents with Default Values for New Fields

If you add a new non-required field (primitive or compound) to an existing document template and specify a default value, you may choose to add this default value to existing documents. This step is optional because the field is not required.

If you add a new required field (primitive or compound) with a default value, you must add this default value to existing documents that use that template. This is supported only for document templates that use Relaxed Node Types. Adding required fields to templates that use Strict Node Types is not supported.

For instructions on adding new fields with default values, see Updating Existing Content Items.

Backward-Incompatible Changes

Any change to a document namespace that is not listed as backward-compatible is considered backward-incompatible. Bloomreach Content does not support backward-incompatible changes.

Summary

  • The system automatically updates document templates during deployment.
  • Only backward-compatible changes are supported.
Share Feedback
Page: /build/content-updates/update-document-templates
Section: Build
Category *