This page last changed on Aug 04, 2006 by cmiller.

Web UI Plugins allow plugin authors to insert links to their custom actions or servlets directly into the Confluence UI, at predetermined locations. The implementation is pretty simple: for the most part you don't need any custom code to implement them, you just need to add their definitions to atlassian-plugin.xml.

For my userinfo plugin, I am going to create a link to my custom action in the user's profile, just where they would edit any of their other account details:

<web-item key="edituserinfo" name="Edit Profile" section="system.profile.edit/yourprofile" weight="20">
        <label key="Contact Details" />
        <link>/users/userinfo/edituserinfo.action</link>
    </web-item>

Some notes:

  • The section attribute determines where in the Confluence UI the item will be inserted. The best way to find out which section is correct is to look at Confluence's default web items in WEB-INF/classes/plugins (they're defined in the -sections.xml and -tabs.xml files)
  • You can also define icons for your link, but since this section doesn't use icons, we don't bother.

Now the link points to where we want it to, but when you follow the link, you're blown out of the theme's tab layout. This is what we fix by adding a decorator to the form template.


with-details-link.png (image/png)
Document generated by Confluence on Oct 10, 2007 18:36