Versions Compared

Key

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

...

Light modules can contain more or fewer folders compared to this example.

...

Light modules folder: magnolia.resources.dir 

...

Magnolia light modules

...

Magnolia Light module must reside within the Magnolia resources directory; this directory is also often referred to as the Magnolia light modules folder. The name and the location of this directory are arbitrary, but you must provide the path to the folder via configuration.

Include Page
_What is magnolia.resources.dir
_What is magnolia.resources.dir

(warning) Magnolia 5.6.1+: A change in the light modules folder may also flush the server cache. You can configure this behavior under /modules/cache/config/contentCaching/defaultPageCache/flushPolicy/policies/lightModule/pathToCacheMappings/defaultPageCache with the pattern property, which specifies the pattern for the operation. The default value is .*/(templates|webresources|i18n)/.* .

What items can be defined in a light module?

...

Creating a light module with Magnolia CLI

Include Page
_Creating a
With Magnolia CLI you can create a complete
light module
structure with a single command. 

Open a shell, change to your light modules folder and run the following command:

Code Block
mgnl create-light-module my-module

with Magnolia CLI
_Creating a light module with Magnolia CLI
Instead of my-module use an appropriate name (special characters or spaces are not allowed).