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:

    hello-magnolia/
    ├── decorations/
    ├── dialogs/
    │   ├── components/
    │   └── pages/
    ├── i18n/
    │   └── hello-magnolia-messages_en.properties
    ├── includes
    │   └── README.txt
    ├── README.md
    ├── 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.

Feedback

DX Core

×

Location

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