JIRA 4.0 : __downloadable_plugin_resource
This page last changed on Oct 18, 2008 by smaddox.
Defining a Single Downloadable ResourceDownloadable resources are configured to map a name of some downloadable file to its location within the plugin jar-file. <atlassian-plugin name='IM Presence Macros' key='confluence.extra.impresence'> <plugin-info> <description>Macros to show online status for popular Instant Messaging services.</description> <vendor name="Atlassian Software Systems" url="http://www.atlassian.com"/> <version>0.1</version> </plugin-info> <macro name='aim' class='com.atlassian.confluence.extra.impresence.AIMPresenceMacro' key='aim'> <description>Displays an AIM status graphic.</description> <resource type="download" name="aimon.gif" location="templates/extra/impresence/aimon.gif"> <param name="content-type" value="image/gif"/> </resource> </macro> <resource type="download" name="aimoff.gif" location="templates/extra/impresence/aimoff.gif"/> </atlassian-plugin>
Defining a Directory of Downloadable ResourcesIf your plugin requires a lot of resources, you may wish to expose a directory of files as resources, rather than writing definitions for each individual file. <resource type="download" name="icons/" location="templates/extra/impresence/icons/"/>
Referring to Downloadable ResourcesThe URL for a downloadable resource is as follows: {server root}/download/resources/{plugin key}:{module key}/{resource name} For example: http://confluence.example.com/download/resources/confluence.extra.impresence:aim/aimon.gif In a velocity template, you should use the $req.contextPath property to ensure that your resources are always relative to the URL of the Confluence server: $req.contextPath/download/resources/confluence.extra.impresence:aim/aimon.gif |
![]() |
Document generated by Confluence on Oct 06, 2009 00:25 |