This server will be upgraded at 3pm Sydney time on December 3rd (December 2nd, 8pm PST) and will be down for up to 30 minutes.
This documentation relates to the latest version of Confluence.
If you are using an earlier version, please go to the documentation home page and select the relevant version.

Decorator Plugins

All Versions
Click for all versions
Confluence 2.10 Documentation

Index

Decorator plugin modules are available in Confluence 2.5 and later versions

Decorator plugin modules allow you to add decorators without using a Theme Plugin.

Decorator Plugin Module

The following is an example atlassian-plugin.xml file containing a single decorator:

<atlassian-plugin key="com.atlassian.confluence.extra.sample" name="Sample Plugin">
...
    <decorator name="myDecorator" page="myDecorator.vmd" key="myDecorator">
        <description>My sample decorator.</description>
        <pattern>/plugins/sampleplugin/*</pattern>
    </decorator>
...
</atlassian-plugin>
  • the page attribute of decorator defines the name of the decorator resource file
  • the pattern element defines the url pattern for which the decorator will be applied to (you can only have one pattern per decorator)

Decorator resource file

Decorator files are written in the Velocity templating language and have the VMD extension. The following is a sample decorator file:

<html>
<head>
    <title>$title</title>

    #standardHeader()
</head>

<div id="PageContent">
    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
        <td valign="top" class="pagebody">
            <div class="pageheader">
                 <span class="pagetitle">$title</span>
            </div>
            $body
         </td>
    </tr>
    </table>
</div>

</body>
</html>

You can familiarise yourself with Velocity at the Velocity Template Overview and decorators in general at the Sitemesh homepage.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Oct 26, 2007

    Anonymous says:

    Is there a reason why you would limit the plug-in to one pattern per decorator?

    Is there a reason why you would limit the plug-in to one pattern per decorator?

    1. Oct 29, 2007

      Mei Yan Chan says:

      Hi, The plugin should support for multiple decorators and patterns in the decor...

      Hi,

      The plugin should support for multiple decorators and patterns in the decorator plugin. I have created an improvement request for this issue at

      Feel free to cast your vote to increase its popularity and add yourself as a watcher so that you will be notified if there are any updates to the issue.

      Regards,
      Mei

Add Comment