Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Example configuration:

gitcmsuserscmeier/repos/content-type-examples/raw/contentTypes/tourGuide.yaml?at=master
Code Pro
profilebitbucket-cmeier-repo
languageyml
title/content-type-examples/contentTypes/tourGuide.yamlurl
datasource:
  workspace: tourguides
  namespaces:
    mt: https://
www.magnolia-
travel.com/
jcr/
1.0/mt
  autoCreate: true
 
model:
  nodeType: mt:tourGuide
  properties:
    - name: birthday
      type: Date
    - name: gender
    - name: shortBio
    - name: contact
      type: contactData
  subModels:
    - name: contactData
      properties:
        - name: email
        - name: phoneNumber
        - name: addresses
          type: address
          multiple: true
    - name: address
      properties:
        - name: street
        - name: city
        - name: postalCode
        - name: country

The model properties:

properties

Anchor
anc-model-properties-list
anc-model-properties-list
required

A list of property definition objects.

<property>

A subdefinition item defining one property of the model. Its definition interface is

Javadoc resource link
classNameinfo.magnolia.types.model.PropertyDefinition
renderTypeasynchronous
.

Read the property definition properties section for all the details of a PropertyDefinition object.

subModels

Anchor
anc-submodels-property
anc-submodels-property
optional

A list of submodel definition objects.

<submodel>

A subdefinition item configuring a complete submodel. Its definition interface is

Javadoc resource link
classNameinfo.magnolia.types.model.SubModelDefinition
renderTypeasynchronous
.

A submodel has the same properties as a model, but a submodel cannot have additional submodels.

Anchor
anc-submodel-nodeType-property
anc-submodel-nodeType-property
If nodeType is not provided, the mgnl:contentNode is used by default.

nodeType

Anchor
anc-nodeType-property
anc-nodeType-property
optional

The name of the JCR node type for storing an item of the given content type.

If the given node type has not been registered yet, the system automatically registers a new node type by the given name. The type generated inherits from the Magnolia mgnl:content node type.

If nodeType is not provided, mgnl:content is used by default.

...