I've customized a couple of the vmd files that are present in the <confluence install dir>/confluence/decorators/components/ folder. I've been able to manually copy the customized files and place them there and restart confluence and every thing works fine. But I'd like to package these files in a Confluence plugin and deploy them that way. Is this doable? I've looked at the layout and decorator tags for atlassian-plugin.xml, but haven't figured out a way to get these vmd files in the right folder at deployment time.
I found this by looking at the documentation theme plugin (it is in the atlassian-plugin.xml file inside the atlassian-plugin tag) :
<layout key="main" name="Main Decorator" class="com.atlassian.confluence.themes.VelocityDecorator" overrides="/decorators/main.vmd"> <resource type="velocity" name="decorator" location="doctheme/decorators/main.vmd" /> </layout> <layout key="page" name="Page Decorator" class="com.atlassian.confluence.themes.VelocityDecorator" overrides="/decorators/page.vmd"> <resource type="velocity" name="decorator" location="doctheme/decorators/page.vmd" /> </layout>
This overwrites the main.vmd and page.vmd in "<confluence install dir>/confluence/decorators/" with your main.vmd and page.vmd files located relative to your atlassian-plugin.xml in this folder : "doctheme/decorators/"
If you want to develop a theme, you will also need to include these lines inside your theme tag in order to apply these decorators everywhere your theme is enabled :
<layout key="the.key.of.your.plugin:main"/> <layout key="the.key.of.your.plugin:page"/>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.