Magnolia 5.6 reached end of life on June 25, 2020. This branch is no longer supported, see End-of-life policy.
...
Table of Contents |
---|
Below you see the structure of an exemplary light module. Example of light module structure:
Code Block |
---|
magnolia.resources.dir/ └── <module-name>/ ├── apps/ ├── dialogs/ │ └── myDialog.yaml ├── module.yaml ├── webresources/ └── templates/ ├── components/ │ ├── myComponent.ftl │ └── myComponent.yaml └── pages/ ├── myTemplatemyPage.ftl ├── myPage.js └── myTemplatemyPage.yaml |
Light modules can contain more or less fewer folders compared to this example.
...
magnolia.resources.dir
...
Please note that a Magnolia Light module Magnolia light modules must reside within the so called "magnolia resources directory". Magnolia resources directory; this directory is also often referred to as the Magnolia light modules folder. The name and the location of this directory is are arbitrary - , but you have provide must provide the path to the folder via configuration.
Include Page | ||||
---|---|---|---|---|
|
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)/.*
.
The following items all can be defined within a light module with YAML:using YAML. Items defined by YAML can be decorated, or can be reused with YAML inherit and include.
Multiexcerpt include | ||||
---|---|---|---|---|
|
Other non YAML-based items which can be in a light module:
Include Page | ||||
---|---|---|---|---|
|