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! |
Take care on each new release of Confluence to reapply your changes to the new default templates.
To reapply your custom layouts, you need to:
Ideally, you should keep a record of each customisation you have applied to each of your Confluence site or space layouts.
If not, you should be able to find your customisations using the following method. This method extracts all site- and space-level layouts from your Confluence site as a single output. From this output, you should be able to identify your customisations.
This method is handy to use if you have:
|
Before Confluence 2.3, custom layouts are stored in the velocity directory within your Confluence home directory tree. You can open these files in any text editor.
In Confluence 2.3 and later, 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 applicable to all SQL databases.
When you upgrade Confluence to another major release of Confluence, you will need to manually re-apply any customisations you made to any site-wide or space-specific layouts. Unless otherwise stated, you should not need to re-apply customisations after conducting a minor release upgrade of Confluence.
|
If you have made Confluence site-wide layout customisations:
If you have made space-specific layout customisations:
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.
For Confluence 2.6, the velocity.properties file is available in the confluence-2.6.0.jar file. The jar file is located in the WEB-INF/lib directory. If you wish to make modification to the files in the jar, we recommend the following steps:
|
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. It's beyond the scope of Atlassian Support to test and deploy these changes. |