Adding web resources into plugins
The web resources plugin module, like the resource module we just saw, allows defining downloadable resources. The difference is that the web resources are added at the top of the page in the header with the cache-related headers set to never expire.
An additional advantage of using web resources module is that we can specify the resources to be included in specific contexts within the application.
How to do it...
The root element for the web resource plugin module is web-resource. It supports the following attributes:
Name |
Description |
---|---|
|
The only mandatory attribute. This should be unique within the plugin. |
|
Indicates whether the plugin module should be disabled by default or not. |
|
The localization key for the human-readable name of the plugin module. |
|
Human-readable name of the web resource. |
The following are the key elements supported.
Name |
Description |
---|---|
|
Description of the module. |
|
All the resources... |