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
Community showcase
Published in Confluence

Introducing Confluence Cloud and Jira Software Cloud Premium

Wherever you are in your team’s journey , our goal is to support your big ambitions. We’re a cloud-first company with the mission of unleashing the potential of every team, and to address the range ...

612 views 4 17
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you