Creating the light module

Hello Magnolia

In this section, you create the hello-magnolia module.

  1. Open a terminal.

  2. Go to the light-modules folder of your Magnolia installation:

  3. Run the following command:

    mgnl create-light-module hello-magnolia

    The created structure will look like this:

    β”œβ”€β”€ decorations/
    β”œβ”€β”€ dialogs/
    β”‚   β”œβ”€β”€ components/
    β”‚   └── pages/
    β”œβ”€β”€ i18n/
    β”‚   └──
    β”œβ”€β”€ includes
    β”‚   └── README.txt
    β”œβ”€β”€ templates/
    β”‚   β”œβ”€β”€ components/
    β”‚   └── pages/
    └── webresources/

This is a typical Magnolia module structure.

When creating a name for a module, do not use spaces, accented characters such as Γ©, Γ , Γ§, Γ€, ΓΆ, ΓΌ or special characters such as slashes /, \ and so on.

Magnolia continuously scans the file system folder defined by the magnolia.resources.dir property. In this case, it looks inside the light-modules folder and registers your module(s) automatically. It detects new and modified templates, dialogs and (web)resources.

Open the Resource Files app from the Web dev section of the App launcher, and look for the hello-magnolia module structure to confirm it has been registered:

Resource files

The The origin icon icon in the Origin column indicates that the resource is loaded from the file system.


DX Core



This widget lets you know where you are on the docs site.

You are currently perusing through the DX Core docs.

Main doc sections

DX Core Headless PaaS Legacy Cloud Incubator modules
6.3 beta

Magnolia 6.3 beta

Magnolia 6.3 is in beta. We are updating docs based on development and feedback. Consider the 6.3 docs currently in a state of progress and not final.

We are working on some 6.3-beta known issues during this phase.