resources workspace in the repository and makes it available in the Templating Kit > Resources menu. The module is a complementary module in that it does not function independently, but rather extends the functionality of the Standard Templating Kit.
- Alternative access methods
Resources is a community module included in the Standard Templating Kit bundle and is typically already installed. Go to Magnolia Store > Installed modules in AdminCentral to check. To install the module individually, see the general module installation instructions. In order to use this module, the STK needs to be installed.
See the general module uninstalling instructions and advice.
The Resources module requires no configuration. On installation the module creates the following configuration at Configuration >
templates node registers the template definitions for the resource types used in Templating Kit > Resources.
All template definitions use the ResourceTemplate Java class that extends the ConfiguredTemplateDefinition class to allow for the
- References its own template renderer in the
- Links to a dialog in the
- Registers the FreeMarker content type in the
referencetemplate defintion does not require this property.
The definitions of the dialogs used in Templating Kit > Resources are configured in the
dialogs node. These dialogs are used to create and edit the different resource types. See Usage below.
renderers node registers the required template renderers.
|ResourcesTextTemplateRenderer||Allows for the interpretation of FreeMarker notations in processed resources. This renderer uses the content and its subnodes as a FreeMarker template.|
|ResourcesBinaryRenderer||Streams the binary data stored in the content.|
|ReferenceResourceRenderer||Resolves the referenced resource and triggers the rendering of the referenced resource node.|
To create a new resource item:
- Click New Item.
- Name the item and select the resource type.
- Click Edit Item or double-click on the file icon.
- Fill fields in the dialog.
text dialog. The Content field uses the
In the Advanced tab:
- Bypass: If checked, the resource is loaded by the standard mechanism which loads from the file system or classpath resources. If unchecked, the resource is loaded from the repository. The first is the recommended best practice while the latter is useful during learning and development.
- Extension: The script extension is added to the path if Bypass is selected.
- Model Class: Allows for the use of a model class other than that in the template definition, which is overridden.
binary dialog allows for the upload of binary files such as images to the
The template images used by the
pop-mobile themes are stored in the
This mechanism makes the individual scripts easily available for aggregation. For example
jquery.tabtree is used by both the
mobile-scriptloader-plugin aggregator scripts.
On installation, the module creates the
resources-base role that grants the following permissions:
|Resources||Read/Write||Selected and sub nodes||
|Config||Read only||Selected and sub nodes||
|Read only||Selected and sub nodes||
|Read only||Selected node||
These permissions are also included in the
superuser role, but are not granted to any other default user or group. The
anonymous roles grant
Read Only permissions to the