It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

0 votes
Answer accepted

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 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;

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
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published Thursday in Confluence

Confluence CVEs and common questions

Two vulnerabilities have been published for Confluence Server and Data Center recently: March 20, 2019 CVE-2019-3395 / CVE-2019-3396 April 17, 2019 CVE-2019-3398 The goal of this article is...

361 views 0 12
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