Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: DOCU-2700

...

alignright
classmenu

Use the Magnolia Content type definition to specify a content type.

DOCS60:_content types developer preview short info
Include Page
DOCS60:_content types developer preview short info
Include Page
DOCS60:_what is a Magnolia content typeDOCS60:
_what is a Magnolia content type

...

The definition item can be supplied via any Magnolia Resource origin. You can create them in a light module, in a Magnolia Maven module or in the JCR configuration workspace (see Location of the content type definitions).  New content type definition items are detected by the  magnolia-content-types  module and registered at the 

Javadoc resource link
classNameinfo.magnolia.types.ContentTypeRegistry
renderTypeasynchronous
 using the name of the definition as the ID.

...

Example configuration:

bitbucket-cmeier-repogitcmsuserscmeier/repos/content-type-examples/raw/contentTypes/tourGuide.yaml?at=master
Code Pro
profile
languageyml
title/content-type-examples/contentTypes/tourGuide.yaml
sections%%datasource%% - %%shortBio%%
url
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

Here we only focus on the top level properties of the content type definition.

...

The definition item can be supplied via any Magnolia Resource origin. You can create them in a light module, in a Magnolia Maven module or in the JCR configuration workspace.

...