Document Type Editor
The brX Content module includes a WYSIWYG Document Type Editor which allows web developers to create and modify document types to be used in their projects. A document type defines a type's data structure as well as the editing template used by authors to create and modify documents of that type.
Using the Document Type Editor
The Document Type Editor is available to users with developer privileges and is located in the Content Workspace in the Document Types section.
Browsing, creating and editing document types is very similar to browsing, creating and editing actual documents.
When editing a document type fields can be added, moved, modified and removed.
To protect the integrity of the live site, document type changes must be associated with a developer project and go through the project review process. A new or modified document type must be merged as part of the project before it is available to authors. However, developers can immediately work with an updated or new document type in the context of the developer project to test changes or to prepare updates to existing content.
Standard Field Types
Bloomreach Experience Manager provides a standard set of field types that can be used to create document types.
Primitive Types allow storage and editing of basic data types that have a simple structure.
A Boolean field is displayed as a single checkbox. Its value is either true (checked) or false (unchecked). Its default value if false.
Boolean Radio Group
A single value radio button group widget to set a Boolean value. Its default value is false. Optionally, the labels for the true and false options can be read from a value list document.
A CalendarDate allows a date to be entered in a text box or through the provided calendar widget.
A Date field includes date as well as time. A date value can be entered in a text box or through the provided calendar widget. A time value can be entered through text boxes for hours and minutes.
A Decimal Number field is used for decimal values. Its default value is 0.0.
A single value dropdown widget populated from a value list service.
A Html field is used for formatted text content. It is stored as HTML markup in a String property.
Open UI String
An Open UI String field uses the document field extension point to display a custom field type.
A Long field is used for integers (or whole numbers). Its default value is 0.
A single value radio button group widget populated from a value list service.
A single value dropdown widget populated from a static value list specified as comma-separated values in the field properties.
A String field is used for single-line plain text content.
A Text field is used for multi-line plain text content. It is stored as a String property.
Compound Types are reusable blocks of fields. They are stored as child nodes. A Compound Type can contain both Primitive and Compound Type fields.
An Image Link field is used to include an image from the gallery in the document. The delivery tier will resolve the reference and translate it to a website URL on-the-fly. If a CMS user tries to delete the referenced image they will see a warning that it is being referred to and deleting the image will cause a broken link in the referring document.
A Link field is used to create an internal link to a different content item (such as a document or asset) in the repository. The delivery tier will resolve the reference and translate it to a website URL on-the-fly. If a CMS user tries to delete the referenced content item they will see a warning that it is being referred to and deleting the item will cause a broken link in the referring document.
A Resource field is used to embed a file (e.g. an image or a PDF document) in a document. The file is stored within the document and can't be reused by other documents.
Rich Text Editor
A Rich Text Editor field is used to store fully featured rich text content. It is stored as HTML markup within the document. The Rich Text Editor provides authors with the freedom to format text and include tables, images, links, etc. The delivery tier will include references to other content items (such as images and links to other documents).
Custom Types are provided by Bloomreach. They are similar to Compound Types in the sense that they are complex fields that cover a more advanced use case, however, they are not just created by adding Primitive and Compound Type fields together, instead, they are tailor-made.
The Content Block Custom Type provides content authors with the ability to add pre-configured compound types to a document, which allows for a more flexible document types in which authors have the freedom to choose which compound(s) to use.
On the Content Block field configuration, developers configure:
- The available compounds within the content block.
- If the Content Block is multiple or not. If it's multiple, the author will be able to add as many of the available compounds as he wants (even multiple of the same type).
Each field in a document type has a number of properties. The exact properties differ per field type, but every field must have at least a Caption property and a Path property.
The caption of a field is the label that is displayed directly above the field in the editing template. Authors will know a field by its caption. A caption is single-line plain text and may contain spaces and special characters.
The path of a field is the name that is used to store the value of the field. Under the hood the product exclusively refers to a field by its path, and the path also determines the property name used in the Page Delivery API. A path may not contain spaces or special characters.
Optionally a hint to authors can be added to a field. The hint is displayed as a question mark icon with a mouseover popup.
Optionally one or more CSS classes can be added in order to apply custom styling to the field.
Any field that is not Optional can be made required by checking the Required checkbox. Authors can't save documents if they haven't entered a value in a required field.
Any field that is not Required and not Multiple can be made optional by checking the Optional checkbox. Authors can remove the field completely from a document by clicking on an 'X' icon, and add it back by clicking on a '+' icon. This can be particularly useful for compound fields that contain required fields.
Multiple and Ordered
Any field that is not Optional can be made multi-valued by checking the Multiple checkbox. This adds plus and minus icons to the field so authors can add or remove values.
A multi-valued field can be made orderable by checking the Ordered checkbox. This adds arrow icons to the field so authors can move values up, down, to the top, and to the bottom. Optionally, the "move to the top" and "move to the bottom" arrows can be hidden by adding the CSS class hide-top-bottom-arrows to the field's CSS Classes property.