Personal tools
     DOCUMENTATION

rPath Appliance Platform:Plugin Static Files

From rPath Wiki

Jump to: navigation, search

Plugin developers can include static files such as images, cascading style sheets, and JavaScript code for use by an rPath Appliance Platform plugin.

Add these files to the directory <project_name>/<plugin_name>/web/static. Then, refer to each file in kid templates with a variable in the following format:

${tg.url('/<plugin_name>/static/<file>')}

In this example, <plugin_name> corresponds to the string used to name the plugin directory, and <file> is the static content's filename. Any subdirectory of the static directory can also be added to the path. In the following example, a file named button.png is organized under a subdirectory named images:

${tg.url('/<plugin_name>/static/images/button1.png')}