Document Type Editor
Overview
The Document Type Editor in Bloomreach Content is a WYSIWYG tool for creating and modifying document types. A document type defines both the data structure and the editing template that authors use to create and edit documents.
Info: For a practical introduction, see the Build a Website tutorial.
When to Use
Use the Document Type Editor during development to define or update document types. Do not use it in production environments. To deploy document type changes to production, follow release management procedures.
Info: Avoid using reserved names from the Delivery API when naming content types.
Accessing the Document Type Editor
Only users with administrator privileges can access the Document Type Editor. It is located in the Content Workspace under the Document Types section.

You can browse, create, and edit document types using similar actions as when managing documents.

When editing a document type, you can add, move, modify, or remove fields.

You must commit any new or modified document type before it becomes available to authors.

Info: After modifying a document type, update existing documents of that type using an updater script if needed.
Standard Field Types
Bloomreach Content provides a set of standard field types for document types. You can add more field types through plugins or custom development.
Info: You can add commonly used plugins with additional field types from the Feature Library in the setup application.
Primitive Types
Primitive types map directly to primitive JCR property types.
Boolean
Displays as a single checkbox. The value is true (checked) or false (unchecked). The default value is false.

Boolean Radio Group
Displays a radio button group for Boolean values. The default is false. You can configure custom labels for true and false using a value list document.

Info: See Selections Plugin Configuration for details.
CalendarDate
Info: Available in brXM 11.1 and later.
Allows date entry via a text box or calendar widget.

Date
Captures both date and time. Date can be entered via text box or calendar widget; time is entered via hour and minute fields.

Decimal Number
Stores decimal values. The default value is 0.0.

Docbase
Creates a weak reference to a folder, document, asset, or image in the repository by storing the UUID of the referenced JCR node as a String.

If a document refers to another item using a Docbase field, deleting the referenced item does not trigger a warning (unlike Link and Imagelink fields). The delivery tier API does not automatically resolve links for Docbase fields; you must implement logic to retrieve the content bean using the stored UUID.
Dynamic Dropdown
Displays a dropdown populated from a value list service.

Info: See Selections Plugin Configuration for more information.
Html
Used for formatted text content. Stores HTML markup as a String property.

Open UI String
Info: Available since brXM 13.2.0.
Uses the document field extension point to display a custom field type.

Integer Number
Stores integer (whole number) values. The default value is 0.

Radio Group
Displays a radio button group populated from a value list service.

Info: See Selections Plugin Configuration for configuration details.
Static Dropdown
Displays a dropdown populated from a static value list defined as comma-separated values in the field properties.

Info: See Selections Plugin Configuration for more information.
String
Used for single-line plain text input.

Taxonomy
Info: Available since brXM 15.3.0.
Allows selection of categories from a taxonomy. The taxonomy must exist and is referenced by its JCR node name in the field's taxonomy.name property. For configuration, see Taxonomy Plugin Configuration.

Text
Used for multi-line plain text input. Stores the value as a String property.

Compound Types
Compound types are reusable groups of fields stored as child nodes. A compound type can include both primitive and compound fields.
You cannot sort document query results by fields inside a compound type in the delivery tier. For more information, see Search Tips.
Image Link
References an image from the gallery. Stores a reference to the image's JCR node. The delivery tier resolves this reference to a website URL. If a user tries to delete a referenced image, the CMS displays a warning and deletion breaks the link in the document.

Link
Creates an internal link to another content item (document or asset) in the repository. Stores a reference to the item's JCR node. The delivery tier resolves this reference to a website URL. Deleting a referenced item triggers a warning and breaks the link in the referring document.

Resource
Embeds a file (such as an image or PDF) directly in the document. The file is stored in a JCR node within the document and cannot be reused by other documents.

Rich Text Editor
Stores rich text content as HTML markup in a JCR node. Authors can format text and include tables, images, and links. The delivery tier must parse this content to resolve references to other items.

Value List Item
A key-value compound type used in the Value List document type for managing values in Selection fields such as Dynamic Dropdowns and Radio Groups.

Do not modify the Value List Item compound type. It is required by the Value List document type and by Dynamic Dropdown and Radio Group fields.
Field Properties
Each field in a document type has several properties. The available properties depend on the field type, but every field must have at least a Caption and a Path.
Caption
The caption is the label shown above the field in the editing template. Authors use this label to identify the field. Captions can include spaces and special characters.
Path
The path is the name used to store the field's value. Internally, the system refers to fields by their path, prefixed by a namespace. The path maps to a JCR property name (for primitive types) or node name (for compound types). Paths cannot contain spaces or special characters.
Hint
Optionally, you can add a hint to a field. The hint appears as a question mark with a mouseover popup.
CSS Classes
You can specify one or more CSS classes to apply custom styling to a field. Define the CSS classes in a custom .css file in the cms module.
Required
To make a field required, select the Required checkbox. Authors cannot save documents without entering a value in required fields.
Hint: You can also create custom field validators.
Optional
Fields that are not Required and not Multiple can be made optional by selecting the Optional checkbox. Authors can remove optional fields from a document by clicking the 'X' icon and add them back with the '+' icon. This is useful for compound fields that include required fields.
Hint: Remove an optional field from a document type's prototype by clicking the field's 'X' icon in the Document Type Editor.
Multiple and Ordered
Fields that are not Optional can be set as multi-valued by checking the Multiple checkbox. This adds plus and minus icons so authors can add or remove values.
To allow authors to reorder values in a multi-valued field, check the Ordered checkbox. This adds arrow icons for moving values up, down, to the top, or to the bottom. To hide the "move to the top" and "move to the bottom" arrows, add the CSS class hide-top-bottom-arrows to the field's CSS Classes property.
Custom Validation
You can implement custom field validators in addition to marking fields as required.
Document Type Inheritance
Bloomreach Content supports inheritance for document types. Projects created with the archetype include a base document type that all other types inherit from by default.
To change the super type of a new document type, select a different document type in the Super type field when creating it:

The editing template for the new type starts empty. You can add inherited fields by selecting them from the Inherited section in the editor's right column:

Hint: At the content repository level, the document type's JCR node type inherits from the super type's node type. At the delivery tier, the content bean class generated by the BeanWriter tool extends the super type's bean class. When performing search queries in the delivery tier, include or exclude subtypes as needed.