Understanding how Content Editor interprets content definitions
Content Editor is an application that users use to create and publish content. Jahia includes default content types and you can also create your own. You can also personalize the content types that are available to users in Content Editor.
This topic shows developers how a content definition is interpreted by Content Editor and how the content type specified in the definition displays to users.
How content types display in Content Editor
You define content types by editing the
definitions.cnd file. The
definition.cnd file defines the Content Editor user interface for each content type. For example, the following code defines the default
jnt:news content type.
[jnt:news] > jnt:content, mix:title, jmix:editorialContent, jmix:structuredContent - jcr:title (string) i18n mandatory - desc (string, richtext) i18n - image (weakreference, picker[type='image']) - date (date) = now()
The content definition inherits the
jnt:content type and has three mixins:
jmix:structuredContent. Each of the four properties,
date, displays as a field in Content Editor.
titleproperty is a string that displays as a mandatory input text field
descproperty is a string with a rich text value that displays a rich text field that uses the CKEditor
imageproperty is a weakreference with a picker of image type that displays a clickable field that allows you to select an image
dateproperty is a date that displays a date picker
The following image shows how to content type renders in Content Editor.
In your definitions.cnd file, you can also add a:
- Section to a Content Editor form by defining an
- Fieldset (a group of fields) in a Content Editor form by defining a mixin that includes properties