Confluence 5.2 のサポートは終了しています。
ドキュメントの最新バージョンを確認してください。
コンテンツ ゾーン テーブル マクロを使用して、コンテンツ テーブルを作成するページ内のセクション (ゾーン) を区切ります。見出しをフラット リストとしてスタイリングし、セクションやページの一番上と下にリンクのリストを配置して、Web ナビゲーションに似たナビゲーション バーを提供します。
コテンツ ゾーン テーブルを使用する
コンテンツ ゾーン ページ マクロをページに追加するには:
- In the Confluence editor, choose Insert > Other Macros.
- Find and select the required macro.
オートコンプリートでマクロを素早く入力する方法
既存のマクロを編集する方法: マクロのプレースホルダをクリックして、[編集] を選択します。マクロのパラメータが編集可能な場合、マクロのダイアログ ウィンドウが開きます。
パラメーター
パラメータは、マクロ出力の内容や形式を制御するために設定するオプションです。
パラメーター | 既定 | 説明 |
---|---|---|
場所 | 両方 | 出力リストを表示するゾーンを指定します。top、bottom またはboth でページ ゾーン コンテンツを囲みます。 |
出力タイプ | list | コンテンツ テーブルのレイアウトを指定します。
|
Display Section Numbering | false | 見出しにアウトライン ナンバリングを適用します。例: 1.1, 1.2, 1.3. |
リスト スタイル | なし | 各リスト項目のブレット ポイントのスタイルを指定します。 有効な CSS スタイルを使用できます。 例:
|
Heading Indent |
| CSS の数に従って、リストのインデントを作成します。「10px」と入力すると、見出しグループが連続して 10px でインデントされます。たとえば、h 1 の見出しの場合、インデントは 10px となり、h 2 の見出しはさらに 10px でインデントされます。 |
Separator | brackets | flat 出力タイプにのみ適用されます。リンクの表示スタイルを指定します。 次のいずれかの値を入力できます。
|
Minimum Heading Level | 1 | TOC リストを開始する最大見出しレベルを選択します。 たとえば、2 の場合、h2、h3、および h4 見出しをリストしますが、1 見出しは含まれません。 |
Max Heading Level | 7 | TOC に含める最小の見出しレベルを指定します。例えば、2 は h1 と h2 をリストしますが、h3 以下は含みません。 |
見出しを含める |
| Filter the included headings according to specific criteria. You can use wildcard characters. See Sun's Regex documentation for examples of constructing regular expression strings. |
見出しを除外する |
| Exclude headings according to specific criteria. You can use wildcard characters. See Sun's Regex documentation for examples of constructing regular expression strings. |
印刷用 | true | 既定では、TOC は印刷用に設定されています。このパラメーターをクリアすると、ページを印刷した際に TOC は表示されなくなります。 |
CSS Class Name |
| お使いの CSS スタイル シートにカスタムの TOC がある場合、このパラメーターを使用して、指定した "class" 属性で TOC を出力できます。 |
例
この例は、次のヘッダーが付いたページに基づいています。
フィルターされた目次
This example will filter all headings to include those that contain "Favourite", but will exclude any heading which ends with the word "Things". The list is styled with upper-case Roman numerals.
パラメーター | 値 |
---|---|
出力タイプ | list |
リスト スタイル | upper-roman |
見出しを含める |
|
見出しを除外する | .*Things |
スクリーンショット: フィルターされた TOC 'zone' 見出し
フラット リスト
この例では、すべての見出しをフィルターして角括弧で囲まれた "Unknowns" のフラット リストをレンダリングします。
パラメーター | 値 |
---|---|
出力タイプ | フラット |
Separator | brackets |
Max Heading Level | 2 |
見出しを含める | Unknown* |
スクリーンショット: フィルターされた TOC 'zone' 見出し (フラット リストとして表示)
注意
- Due to an outstanding issue in the Table of Content Zone macro (CONF-10619), the Macro Browser's Refresh function does not render any parameter modifications. Currently, the rendering of parameter value modifications to the Table of Content Zone macro occurs only after the page is saved.
Using HTML heading markup with the Table of Content Zone macro — The Table of Content Zone macro cannot handle HTML heading markup on its own. Hence, if you used the HTML and HTML Include macros to render HTML heading markup in a Confluence page, the Table of Content Zone macro will not create a contents list out of these headings. (For more information on about this issue, please refer to TOC-93.)
However, if you insert an HTML anchor into each HTML heading on your page (based on the following syntax), the Table of Content Zone macro will incorporate these headings into your contents list.<h2><a name="pagename-headingname"></a>見出し名</h2>
アンカー名の構文は、ハイフンで区切られたページ名と見出し名です。すべてのスペースを削除し、すべてのテキストを小文字に変換してください。すべての句読点を、対応する URL エンコードに変換してください。
コードの例
参照先: