Confluence 4.1 のサポートは終了しています。
ドキュメントの最新バージョンを確認してください。
You can modify Confluence's look and feel by editing the 'decorator' (layout) files. Modifying these files allows you to change the look and feel of:
- The Confluence site as a whole, which includes all spaces within the Confluence site.
- An individual space within the Confluence site.
This page tells you how to customise the layout files for your Confluence site as a whole. These customisations:
- Modify the default 'decorator' files of each space in your site.
- Are reflected in every space unless the space's own equivalent layout files have been customised.
You need System Administrator permissions to perform these customisations.
You can also customise the layout files for a given space. For more information, refer to Customising Space Layouts. Space layout customisations override the equivalent site customisations.
The information on this page does not apply to
If you modify the look and feel of Confluence by following these instructions, you will need to update your customisations when upgrading Confluence. The more dramatic the customisations are, the harder it will be to reapply your changes when upgrading. Please take this into account before proceeding with your customisation. For more information on updating your customisations, please refer to Upgrading Customised Site and Space Layouts.
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. You can learn more from the Velocity User Guide.
Once you are familiar with Velocity, you can edit the decorator files to personalise the appearance of Confluence.
Confluence のデコレーターファイルは、次のカテゴリに分類されています。
- Site layouts: These are used to define the controls that surround each page in the site. For example, the header and the footer.
- コンテンツ レイアウト:ページやブログ投稿などのコンテンツの体裁を制御します。ページ自体の表示を変更するのではなく、配置されているコメントや添付ファイルなどの表示方法を変更します。
- エクスポート レイアウト:スペースやページを HTML 形式でエクスポートするときの体裁を制御します。たとえば、Confluence を使用して静的な Web サイトを作成している場合、このレイアウトを変更する必要があります。
サイト デコレーター ファイルを編集します。
- Choose Browse > Confluence Admin.
- Select Layouts under Look and Feelin the left-hand navigation panel.
- Click View Default to view the .vmd file.
- Click Create Custom to edit the default .vmd file. This will open up the .vmd file in edit mode.
- Make changes and click Update.
If something goes wrong: Click Reset Default to revert to the original layouts.
Velocity マクロを使用する
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
Velocity テンプレートのオーバーライド
velocity ディレクトリは Confluence の Velocity テンプレートの検索パスの手前にあります。そのため、同じ名前のファイルを適切な場所に配置することで、Confluence の任意の Velocity テンプレートを上書きできます。これは変更内容を完全に理解している場合にのみ推奨されますが、Confluence のあらゆる側面で外観を完全に制御できます。また、web インターフェイスではなく、テキスト エディタでテンプレートを編集することもできます。
キャッシング
Velocity はテンプレートをメモリにキャッシュするように設定されています。Confluence 内からページを編集する場合、そのページをディスクからリロードします。ディスク上のページを編集する場合、WEB-INF/classes/velocity.properties で Velocity のキャッシングを一時的にオフにするか、変更を可視化するためにサーバを再起動する必要があります。
Velocity ファイルの場所
In Confluence 2.6 and later, some Velocity files are located inside the Confluence JAR file that can be found at confluence/WEB-INF/lib/confluence-x.x.x.jar. To override files inside this JAR (which you can open with any ZIP tool like WinZip or 7-Zip), put your customised file in the same directory structure under confluence/WEB-INF/classes/.
For example, the file templates/macros/alphaindex.vm inside confluence.jar can be replace by putting your custom file in WEB-INF/classes/templates/macros/alphaindex.vm. You do not need to modify the file inside the JAR.
See also Editing Files within JAR Archives.
URL からレイアウトを探す
レイアウトが表示されないくらい広範囲に変更されている場合、URL を直接参照することができます。
http://<confluence base url>/admin/resetdecorator.action?decoratorName=decorators/main.vmd
Substitute the base URL and the appropriate .vmd file.
関連トピック
指定したラベルを持つコンテンツはありません。


