Confluence 5.7 のサポートは終了しています。
ドキュメントの最新バージョンを確認してください。
Confluence is built on top of the Open Source SiteMesh library, a web-page layout system that provides a consistent look and feel across a site. SiteMesh works through "decorators" that define a page's layout and structure, and into which the specific content of the page is placed. If you are interested, you can read more on the SiteMesh website.
What this means for Confluence is that you can customise the look and feel of parts of your Confluence site through editing decorators, for example:
Confluence 内からこれらのデコレーターを参照および編集することができます。デコレーターに対する変更は、その Confluence 内のすべてのスペースに影響します。
Confluence の管理ページを描画するのに使用されるデコレーターは Confluence 内から編集することはできません。これは、サイトの残りの部分を利用できなくしてしまうミスを犯してしまった場合、管理ページはテンプレートを修正するために利用可能なままである必要があることを意味しています。
At any time, you can browse the default decorators that come packaged with Confluence by following the "View Default" links on the "Site Layouts" page. The template browser also allows you to view the "#parsed" templates that are included within the template when it is compiled. While you can't edit these included templates, you will probably have to copy some or all of them into your custom template as you do your customisation.
To edit Confluence decorators you will need a good knowledge of HTML, and some understanding of the Velocity templating language.
デコレーターを編集する方法:
間違えた場合、または変更を元に戻す場合、編集したデコレーターの隣のデフォルトにリセットを選択します。
別の方法として、カスタムテンプレートはデータベースの DECORATOR に保存されます。テンプレートの編集を介して何らかの方法で Confluence が完全に利用できなくなった場合、DECORATOR テーブルから関連するエンティティを削除します。
Some parts of the page are drawn using Velocity macros, including the navigation bar. The macros you should know about when editing decorators are described in Working With Decorator Macros.
velocity ディレクトリは Confluence の Velocity テンプレートの検索パスの手前にあります。そのため、同じ名前のファイルを適切な場所に配置することで、Confluence の任意の Velocity テンプレートを上書きできます。
これは推奨されませんが、Confluence のあらゆる側面の外観を完全に制御できます。また、お望みなら、ブラウザではなく、テキスト エディタでテンプレートを編集することができます。
ただし、重要な注意点が2つあります。
WEB-INF/classes/velocity.properties で Velocity のキャッシングを一時的にオフにするか、変更を可視化するためにサーバを再起動する必要があります。