Packaging overwritten decorator vmd files as a Confluence plugin?

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

This widget could not be displayed.

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

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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published Tuesday in Confluence

Add-on evaluation with confluence templates

Atlassian market place contains number of Apps/Addons which improves the capability of out of the box Atlassian products. It is good to follow a plugin evaluation process before install add-ons. So t...

140 views 12 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you