Confluence Docs 3.0 : Adding a Configuration UI for your Plugin This page last changed on Sep 07, 2009 by ggaskell. On this page: Purpose of the Configuration UI Adding a Configuration Link for the Entire Plugin Adding a Configuration Link for a Module Example of a Plugin Configuration UI Notes ## Purpose of the Configuration UI A plugin for an Atlassian application can specify internal links within the application, to allow the user to configure options for the plugin. This is useful where your plugin requires configuration or user-specific settings to work. Here are some examples of plugins which provide a configuration UI: The Google Maps plugin for Confluence requires a Google API Key from Google, which needs to be configured on each server, before it will work properly. The WebDAV plugin for Confluence provides a configuration screen that is available both from the Plugin Manager and from a web item in the Administration menu. In Creating your Plugin Descriptor, we tell you how to create the XML descriptor file for your plugin. In Plugin Module Types, we tell you how to define the modules within your plugin. Below is information on defining the links to the configuration UI for your plugin. ## Adding a Configuration Link for the Entire Plugin To add a configuration link for your plugin as a whole, place a single `param` element with the name `configure.url` within the `plugin-info` element at the top of the plugin descriptor:
    <plugin-info>
        <description>A macro which displays Google maps within a Confluence page.</description>
        <vendor name="Atlassian Software Systems Pty Ltd" url="http://www.atlassian.com/"/>
        <version>0.1</version>
        <param name="configure.url">/admin/plugins/gmaps/configurePlugin.action</param>
    </plugin-info>
## Adding a Configuration Link for a Module To add a configuration link for a single module within your plugin, place a single `param` element with the name `configure.url` within the descriptor element for that module:
    <macro name="gmap" class="com.atlassian.confluence.ext.gmaps.GmapsMacro" key="gmap">
        <description>The individual map macro.</description>
        <param name="configure.url">/admin/plugins/gmaps/configureMacro.action</param>
    </macro>
## Example of a Plugin Configuration UI Here is an image showing where the configuration links appear for both a plugin and an individual module within Confluence: ## Notes You can provide configuration links for a whole plugin and/or for any module within a plugin. Configuration links are relative to the application. The configuration URL is a link to a separate page, which you have defined using one of the following: A new XWork action that you have defined via an XWork plugin module. Or a servlet defined via a Servlet plugin module. Not all host applications support configuration links, so you may need to create a web item link in the administration menu to link to your configuration page. ##### RELATED TOPICS Writing Confluence Plugins Enabling TinyMCE Plugins Converting a Plugin to Plugin Framework 2 Creating your Plugin Descriptor Confluence Plugin Module Types Accessing Confluence Components From Plugin Modules Including Javascript and CSS resources Adding Plugin and Module Resources Adding a Configuration UI for your Plugin Ensuring Standard Page Decoration in your Plugin UI Making your Plugin Modules State Aware Confluence Plugin Tutorials Form Token Handling Information sourced from Plugin Framework documentation

Document generated by Confluence on Nov 05, 2009 23:34