Nodes
February 2, 2022
Content Object Model
Node Types
- The node types of a module are defined in a file called
definitions.cnd
, underMETA-INF
in the source directory. - A node type is declared within the context of a namespace. By default, all Jahia standard node types use namespace
jnt
. - Nodes that contain standard properties like metadata, ACL, and version inherit from
jnt:content
. - Drag & droppable nodes are contained within a Content Category.
- Due to the inheritance mechanism all node parent properties are retrievable. Nodes can have at most one single parent.
The Jahia 8 Studio features a CND editor called the Modeler for creating node types and declare their properties.
- Under
src/main/resources/META-INF
in the left panel, and right clickingdefinitions.cnd
brings up an options window. - The contextual menu is used for creating new namespaces and content definitions.
Namespaces
Creating a Namespace
- Right click on the definitions.cnd file for a Module.
- Choose “New node type namespace”.
- Enter the prefix for a namespace.
- Enter the URI.
Primary Node Type
Creating a Primary Node Type
- Right click the definitions.cnd file and choose "New node type definition" in the contextual menu.
- A pop-up window presents the option to select either a mixin or primary node type.
- Select "Primary node type".