Confluence 5.6 のサポートは終了しています。
ドキュメントの最新バージョンを確認してください。
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:
This page tells you how to customise the layout files for your Confluence site as a whole. These customisations:
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.
注意:
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 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 のデコレーターファイルは、次のカテゴリに分類されています。
.vmd
file..vmd
file. This will open the .vmd
file in edit mode.If something goes wrong: Click Reset Default to revert to the original layouts.
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.
velocity
ディレクトリは Confluence の Velocity テンプレートの検索パスの手前にあります。そのため、同じ名前のファイルを適切な場所に配置することで、Confluence の任意の Velocity テンプレートを上書きできます。これは変更内容を完全に理解している場合にのみ推奨されますが、Confluence のあらゆる側面で外観を完全に制御できます。また、web インターフェイスではなく、テキスト エディタでテンプレートを編集することもできます。
Velocity はテンプレートをメモリにキャッシュするように設定されています。Confluence 内からページを編集する場合、そのページをディスクからリロードします。ディスク上のページを編集する場合、WEB-INF/classes/velocity.properties
で Velocity のキャッシングを一時的にオフにするか、変更を可視化するためにサーバを再起動する必要があります。
Confluence インストール ディレクトリで Velocity ファイルを探します。主要な Velocity ファイルは、<CONFLUENCE-INSTALLATION>\confluence\decorators
ディレクトリにあります。たとえば、main.vmd, space.vmd, form-aui.vmd, global.vmd
などがこのディレクトリにあります。
レイアウトが表示されないくらい広範囲に変更されている場合、URL を直接参照することができます。
http://<confluence base url>/admin/resetdecorator.action?decoratorName=decorators/main.vmd
base URL と適切な .vmd
ファイルで置き換えます。