Confluence 5.1 のサポートは終了しています。
ドキュメントの最新バージョンを確認してください。
This user macro creates a panel pre-formatted to specific colours. It will create a panel that looks like this:
Note: The panel's title will be empty if the user does not give a value for the title parameter.
The information on this page does not apply to Confluence OnDemand.
Defining the 'Formatted Panel' user macro
- Choose the cog icon at top right of the screen, then choose Confluence Admin.
- Choose User Macros in the left-hand panel.
- Choose Create a User Macro at the bottom of the list of macros.
- Enter the macro attributes as follows:
- Macro Name:
formpanel - Visibility:
Visible to all users in the Macro Browser - Macro Title:
Formatted Panel Description:
Creates a panel preformatted with specific colours- Categories:
Formatting - Icon URL: You can leave this field empty.
- Documentation URL: You can leave this field empty.
- Macro Body Processing:
Escaped Template:
## @param Title:title=Title|type=string|desc=Title <ac:macro ac:name="panel"> <ac:parameter ac:name="titleBGColor">#ccc</ac:parameter> <ac:parameter ac:name="borderStyle">solid</ac:parameter> <ac:parameter ac:name="borderColor">#6699CC</ac:parameter> <ac:parameter ac:name="borderWidth">2</ac:parameter> <ac:parameter ac:name="titleColor">#000000</ac:parameter> <ac:parameter ac:name="title">$!paramTitle</ac:parameter> <ac:rich-text-body>$body</ac:rich-text-body> </ac:macro>
- Macro Name:
- 保存を選択します 。
マクロ テンプレートのコードの例
| 項目 | 説明 |
|---|---|
## @param Title:title=Title|type=string|desc=Title | @param defines the metadata for your macro parameters. When users select this macro, the macro will contain a parameter called "Title" where they can enter data. A macro dialog window appears when the user selects this macro using Insert > Other Macros or when a user clicks the macro placeholder and chooses Edit. The macro will, later on, use the data stored in this parameter to enter data in the title section of the Panel macro.
このパラメーターは "Title" ト呼ばれます。 title=Title defines the parameter title that will appear in the macro dialog window as "Title". type=string は、パラメーターのフィールド タイプをテキスト フィールドとして定義します。 desc=Title defines the description of the parameter. |
<ac:macro ac:name="panel"> | This command activates the Confluence Panel macro. Hint: To discover the code name of a Confluence macro, see Confluence Storage Format for Macros. If the macro you want is not documented there, follow these steps:
|
<ac:parameter ac:name="titleBGColor">#ccc</ac:parameter> <ac:parameter ac:name="borderStyle">solid</ac:parameter> <ac:parameter ac:name="borderColor">#6699CC</ac:parameter> <ac:parameter ac:name="borderWidth">2</ac:parameter> <ac:parameter ac:name="titleColor">#000000</ac:parameter> | Sets the parameters for the macro: the background colour, border style, border colour, border width and title colour. Hint: To discover the names of the parameters for a Confluence macro, see Confluence Storage Format for Macros. If the macro you want is not documented there, follow these steps:
|
<ac:parameter ac:name="title">$!paramTitle</ac:parameter> | 'Title' パラメーターに保存されている値を、マクロの title セクションに入力します。 「!」は、「タイトル」パラメーターにデータがないときに、タイトルを空白のまま残すようマクロに伝えます。 |
<ac:rich-text-body>$body</ac:rich-text-body> | ユーザーは、マクロの本文に保存されているデータを使用できます。この行により、マクロはマクロに渡された本文コンテンツへのアクセスと保存が可能になります。 |
</ac:macro> | このコマンドは、マクロの終了を示します。 |

