Confluence 3.3 のサポートは終了しています。
ドキュメントの最新バージョンを確認してください。
There are two ways to write a user macro:
- The first way is to create a user macro. You need to be a Confluence Administrator to do this. Below is an example.
- The second, and more difficult, way is to create a user macro plugin. See the guide to user macro plugin modules.
Example of a User Macro
Here's how you can create a user macro which displays the text 'Hello World : ' in front of any variable text you place between the macro tags.
- Go to the 'Administration Console' and click 'User Macros' under 'Configuration' in the left-hand panel.
- Click 'Create a User Macro' at the top of the list of macros.
- Enter the macro attributes as shown in the following screenshot.
- 「保存」ボタンをクリックします。
So, now you can add the following Wiki Markup on your Confluence page:
{helloworld}Matthew{helloworld}
And the result will be as follows:
詳細情報
The macro itself is written in the Velocity Templating Language. You can find more information in the Velocity User Guide from Apache.
関連トピック
概要
コンテンツ ツール
アプリ