This documentation is still in progress. We are working hard to update all our screenshots to the new Magnolia 6 style. Please bear with us.

Page tree
Skip to end of metadata
Go to start of metadata

DEVELOPER PREVIEW

The Magnolia Content Types module is a tool to define the content model in Magnolia.

Your content model is a key consideration for every web and digital experience project you work on. It creates a shared understanding across the domains of a project, from project owners to marketing leads, content creators to developers.

It describes the key types of content in your project, the properties each of those types has and the relationships between the content types.

Content apps, apps for managing content, can be easily created from content types.

The Magnolia Content Types module is currently available as a Developer Preview. The full version is still under development.

This developer preview brings several powerful features. Please try it out and feel free to send us your feedback and suggestions based on your experience.

We are working to finalize the module as soon as possible.

Rapid development and fast deployment

Using Magnolia content types means rapid development and quick deployment to a running system, thus reducing the time to market.

Once the content apps are in place, editors can start entering content right away. They can do so in parallel with or even before the rest of the project/template development.

All in one YAML file

A developer can configure all the required definitions for a content type in a single YAML file within a light module. The YAML file can contain both the content model and the details about where to store the data such as a JCR workspace and node type. 

 Click to see an example of a content type definition

/content-type-examples/contentTypes/tourGuide.yaml
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

Automatically generated apps

Creating, editing, publishing, managing and deleting content items of a content type works best with a content app. The content types module automatically generates this app for you based on the content type definition. All you have to do is to provide a minimalistic app definition file referencing the content type definition.

 Click to see an example of an app definition referencing a content type

/content-type-examples/apps/tourGuides-app.yaml
!with-type:tourGuide
name: tourGuides-app

Quick deployment to a running system

Using light modules you can deploy new content types and apps to your production environment without redeploying a WAR file or restarting Magnolia. This reduces the time to market and it is a perfect approach if you have a Magnolia Cloud subscription package.

Convention over configuration

The Content Types module helps facilitate the development process by following the principle of convention over configuration. With a minimal configuration you can achieve feasible results which follow Magnolia's best practices based on typical use cases. 

Nevertheless, you can also map highly complex and sophisticated use cases with content types.

Content modeling from simple to sophisticated

With a content type you can define structured data in a very straightforward way. Such a definition can be kept simple just by configuring a list of plain properties, but it can also go far beyond this: Defining the relations between different content models, linking one or more content items of type A to a content item of type B.

When you need a group of fields more than once in the same model, you may want to use submodels. You can define relations to content items which you created before the Content Types module was available. 

The default configuration of a generated app and its further customization

Defining a content app has never been quicker than with referencing a content type. You can do it with one line of a YAML file.

Magnolia generates a ready-to-use app with simple or complex form fields depending on the type of the properties of the given content type.

To satisfy the custom requirements of your content editors, the defaults of the generated app can be overridden on different levels. 

Content types and headless projects

Combining Content Types with the Delivery endpoint API makes it a perfect match for headless projects.