You can configure which properties your document should have in the CND and by adding mixins. You can learn more about this procedure here. The properties you add in the CND can have the following types:
Property Type | Purpose |
---|---|
boolean | A property with only two possible values - true or false. |
date | A property for date and time values. |
double | A property for floating-point numbers. |
long | A property for integers. |
reference | A property for documents and childnodes. |
string | A property for all sorts of text. |
Adding the keyword multiple after the property declaration enables you to store multiple values into a single property. A complete property declaration should look like this: -'namespace:propertyName' (type) multiple
. Of course, you can omit the keyword multiple. Multiple only works for properties of the types date and string.
The declaration of childnodes is a little bit different, since they don't have a specific type, but a supertype instead. A complete childnode declaration should look somewhat like this: +'namespace:childnodeName' (supertype)
. If the childnode is no specific subtype, you have to declare nt:base
as supertype (roughly corresponding to the fact that all Java classes are subtypes of java.lang.Object
).
Mutual Configuration Options for Properties
There are a few options in a property configuration that all properties have in common. These are:
- Label, Label (Plural): The label which appears in the document editor.
- Description: A short description text which will be displayed as an input field's tooltip.
- Read only: Some input fields should be edited only by the server, scripts or the like, but not by a regular user. You can configure these properties as read-only. Default is no.
- Required: Some input fields should not be empty when saving a document. Configure these as required. Default is no.
- Editable by: Some fields should be edited only by a limited set of users. You can constrain the editability to a set of roles. Defaul is All Roles.
- Required Document Permissions: Some fields should only be edited by users with a specific document permission. You can configure that here. Default is none.