Confluence : Customising Layouts
This page last changed on Apr 22, 2007 by david.soul@atlassian.com.
You can customise the layout of your Confluence instance by editing the "decorators" that define the look and feel of the site. Confluence is built on top of the Open Source SiteMesh library, a web-page layout system. Read more on the SiteMesh website. To edit the layout of Confluence, you will need to modify these decorator files. A decorator file is a vmd file and is written in a very simple programming language called Velocity. Learn more about Velocity. Once you become familiar with Velocity, you can edit the decorator files to personalise the appearance of Confluence. You can customise the layouts for the entire site or for an individual space.
The decorator files are grouped into: Site layouts : These are used to define the controls that surround each page in the site. For example, the header and the footer. Content layouts : These control the appearance of content such as pages and news items: they don't change the way the pages themselves are displayed, but allow you to alter the way the surrounding comments or attachments are displayed. Export Layouts: These control the appearance of spaces and pages when they are exported to HTML. If you are using Confluence to generate a static website, for example, you will need to modify these layouts.
To edit a site decorator file,
Alternatively, the custom templates are stored inside the confluence.home directory you defined in confluence-init.properties when installing Confluence. If you have somehow managed to render Confluence completely unuseable through editing your templates, simply delete the confluence.home/velocity directory, and restart Confluence. The default templates will be restored. CAUTION: Only delete the velocity directory! Changing anything else inside your confluence.home is dangerous, and you could lose important data!
Using Velocity Macros When editing Custom Decorator Templates, there are a number of macros available to define complex or variable parts of the page such as menus and breadcrumbs. You may insert these macros anywhere in your templates. More information on Working With Decorator Macros. For Advanced Users The velocity directory is at the front of Confluence's velocity template search path. As such, you can override any of Confluence's velocity templates by placing an identically named file in the right place. While we don't recommend you do this unless you know exactly what you're doing, it does give you complete control over the look of every aspect of Confluence. It also means that you can edit your templates in a text-editor if you wish, rather than through the web interface.
RELATED TOPICS
|
![]() |
Document generated by Confluence on May 01, 2007 19:28 |