Written by The Jahia Team
   Estimated reading time:

Content Object Model

content-object-model

Node Types

  • The node types of a module are defined in a file called definitions.cnd, under META-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 clicking definitions.cnd brings up an options window.
  • The contextual menu is used for creating new namespaces and content definitions.
 
new-node-type.png
 

Namespaces

Creating a Namespace

  1. Right click on the definitions.cnd file for a Module.
  2. Choose “New node type namespace”.
    new-node-type-create.png
  3. Enter the prefix for a namespace.
  4. Enter the URI.
    namespace-create.png

Primary Node Type

Creating a Primary Node Type

  1. Right click the definitions.cnd file and choose "New node type definition" in the contextual menu.
  2. A pop-up window presents the option to select either a mixin or primary node type.
  3. Select "Primary node type".
    primary-nodetype-create.png