Configure a Document Field Extension
Introduction
Goal
Configure an Open UI document field extension.
Background
An Open UI document field extension must be configured in the repository and added to a document type before it can be used.
Configure the Document Field Extension
A document field extension must be configured with a node of type frontend:uiExtension as child node of the node at the path /hippo:configuration/hippo:frontend/cms/ui-extensions. The node name should only contain alphanumeric characters.
One or more extensions can be configured.
A document field extension configuration node accepts the following properties:
Property |
Description |
Remarks |
---|---|---|
frontend:config |
A string of configuration values to be passed to the extension. This could be for example an api key that the extension requires. How the string is interpreted is up to the extension. Since v14.7, this property value may contain variable references using the Container Configuration for the CMS application (e.g, $CATALINA_BASE/conf/platform.properties).
Suppose this property is set to the following containing a reference to the variable called "backend.url": { "my.backend.api.url": "${backend.url}" } And if you set the backend.url property with value, "https://api.example.com", in the Container Configuration for the CMS application (e.g, $CATALINA_BASE/conf/platform.properties), then the property value will be interpreted to the following at runtime: { "my.backend.api.url": "https://api.example.com/" } |
optional |
frontend:displayName | This property is not used for document extensions. | mandatory |
frontend:extensionPoint | The type of extension point (where in the CMS will the extension be shown). For document extensions it must be: document.field | mandatory |
frontend:initialHeightInPixels | The initial height of the iframe in pixels. When omitted the default value of 150 is used. | optional |
frontend:url |
The URL on which the extension is served. It will be the value for the src parameter of the iframe. If the URL starts with 'http://' or 'https://' the value will be used as-is. All other URLs will be regarded as paths to a tool running on the same origin as the CMS. It's recommended to host extensions on a different origin than the CMS itself. The main advantages are security (extensions cannot interfere with the CMS UI or access the user session) and deployment (extensions can be updated independently of the CMS). |
mandatory |
Use a Document Field Extension in a Document Type
All document field extensions can be used in Open UI String fields in all document types. In the document type editor, add a field of the type "Open UI String". In the field properties, enter the name of the extension in the "ui.extension" property. Use here the name of the configuration node. All regular field options are available for this field type such as caption, hint, multiple, required etc.