This page last changed on Jul 10, 2007 by mjensen.

As Confluence evolves, so do the default layouts that drive the rendering of every page. As new functionality is added, or current functionally is changed, the default layouts are modified to support these changes.

If you are using custom layouts based on defaults from a previous Confluence version, you run the risk of breaking functionality, or worse: missing out on great new features!

Care must be taken on each new release of Confluence to reapply your changes to the new default templates.

To reapply your custom layouts, you need to:

  1. Obtain the source of your custom layout from your current version of Confluence
  2. Reapply your customisations to the new default layouts.

Obtaining Your Custom Layouts

Before Confluence 2.3, custom layouts are stored in the velocity directory within your Conflunce home directory tree. You can open these files in any text editor.

With Confluence 2.3 and after, custom layouts are stored in the DECORATOR table within your Confluence database. You can SELECT for the source of the layout using SQL like this:

mysql> select SPACEKEY,DECORATORNAME,BODY from DECORATOR;
+----------+---------------------+------+
| SPACEKEY | DECORATORNAME       | BODY |
+----------+---------------------+------+
| NULL     | decorators/main.vmd | ...  |
+----------+---------------------+------+
1 row in set (0.03 sec)

This example was tested on MySQL, but should be relevant for all SQL databases.

Reapply Your Customisations

You will need to manually apply the changes you made to the new default layouts provided by the new version of Confluence.

Use the documentation on customising layouts to create a new custom layout and use the source obtained in step 1 to manually reintegrate them.

WARNING
  1. Velocity is configured to cache templates in memory. When you edit a page from within Confluence, it knows to reload that page from disk. If you are editing the pages on disk, you will either have to turn off velocity's caching temporarily in WEB-INF/classes/velocity.properties, or restart the server to make your changes visible.
  2. Because we only officially support the modification of the three global decorator files, other changes may interact unpredictably with future versions of Confluence. When upgrading, you should always test your custom modifications thoroughly before deploying them on a live site.
Document generated by Confluence on Oct 10, 2007 18:47