Versions Compared

Key

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

...

Configuration item

Purpose

apps

optional, YAML supported

Defines the app descriptor to use.

An app descriptor is a group of configuration nodes that describe the app. You can define a proper app descriptor to meet your special needs.

commands

optional

Define commands to use with the Magnolia command management.

config

optional

Module-specific configuration which will be available via the module class (see Module properties).

dialogs

optional, YAML supported

To edit the content.

fieldTypes

optional, YAML supported

See  Fields  for further details about how to define your own field type.

messageViews

optional, YAML supported

To configure the display of the message and operations that editors can do. (see  Message views).

renderers

optional

It is possible to create a custom renderer - also for another templating language, e.g. Velocity. (Magnolia ships with JSP and FreeMarker template renderers.)

templates

optional, YAML supported

Templates can be pages or components. They can use FreeMarker, JSP or a custom templating language.

traits

optional

Include Page
_What is a trait
_What is a trait

virtualURIMapping

optional

Defines mappings that redirect an incoming request to the actual location of the content.

Configuring in JCR vs YAML

Some of the configuration items (above) can be stored as JCR nodes or in YAML files. Storage in JCR nodes is possible for all items whereas not all items support YAML. (Items which cannot be stored yet as YAML files may get YAML support in future Magnolia versions.)

...

Hide block

Location of configuration items

ItemYAML file pathJCR node path in config workspace
Template definition

$magnolia.resources.dir/<module-name>/templates

/modules/<module-name>/templates
Page template definition$magnolia.resources.dir/<module-name>/templates/pages/modules/<module-name>/templates/pages
Block template definition$magnolia.resources.dir/<module-name>/templates/blocks/modules/<module-name>/templates/blocks
Component template definition$magnolia.resources.dir/<module-name>/templates/components/modules/<module-name>/templates/components
Block definition$magnolia.resources.dir/<module-name>/blocks/modules/<module-name>/blocks
Dialog definition$magnolia.resources.dir/<module-name>/dialogs/modules/<module-name>/dialogs
App descriptor

$magnolia.resources.dir/<module-name>/apps

/modules/<module-name>/apps


Module class bean properties

...

Advanced Tables - Table Plus
heading0
multiplefalse
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse
Node nameValue
Mgnl f
modules
 

Mgnl f
my-module

 


Mgnl f
config

 

Mgnl p
foo

bar
Info

A bean in Magnolia configuration can have three states, which are represented by the value of a Boolean property called enabled:

  • enabled = true (default in most cases, there's no need to set this).
  • enabled = false
  • enabled = null, in which case the bean's configuration is either undefined or inherited - merged with its parent, for example when an area from a page template definition can get its values from a prototype.

When using the module class for configuration, create the module configuration in the /modules/<name-of-your-module>/config directory directory. Bootstrap this data to ensure proper installation and setting of the config node.

...

If you want to control processes during the start and stop phase of the module, implement 

Javadoc
0info.magnolia.module.ModuleLifecycle
.