Rate this page:
Available: | Confluence 2.5 and later |
Decorator plugin modules allow you to add decorators without using a Theme Module.
The following is an example atlassian-plugin.xml
file containing a single decorator:
1 2 3 4 5 6 7 8
<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>
decorator
defines the name of the decorator resource fileDecorator files are written in the Velocity templating language and have the VMD extension. The following is a sample decorator file:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
<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.
Rate this page: