Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Packaging overwritten decorator vmd files as a Confluence plugin?

Robert Hall
Contributor
June 19, 2013

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.

1 answer

1 accepted

0 votes
Answer accepted
Hugo Bédard July 23, 2013

I found this by looking at the documentation theme plugin (it is in the atlassian-plugin.xml file inside the atlassian-plugin tag) :

&lt;layout key="main" name="Main Decorator" class="com.atlassian.confluence.themes.VelocityDecorator" overrides="/decorators/main.vmd"&gt;
            &lt;resource type="velocity" name="decorator" location="doctheme/decorators/main.vmd" /&gt;
    &lt;/layout&gt;
    &lt;layout key="page" name="Page Decorator" class="com.atlassian.confluence.themes.VelocityDecorator" overrides="/decorators/page.vmd"&gt;
            &lt;resource type="velocity" name="decorator" location="doctheme/decorators/page.vmd" /&gt;
    &lt;/layout&gt;

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/"

Hugo Bédard August 12, 2013

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 :

&lt;layout key="the.key.of.your.plugin:main"/&gt;
        &lt;layout key="the.key.of.your.plugin:page"/&gt;

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events