コンテンツ ゾーン テーブル マクロを使用して、コンテンツ テーブルを作成するページ内のセクション (ゾーン) を区切ります。見出しをフラット リストとしてスタイリングし、セクションやページの一番上と下にリンクのリストを配置して、Web ナビゲーションに似たナビゲーション バーを提供します。

コテンツ ゾーン テーブルを使用する

コンテンツ ゾーン ページ マクロをページに追加するには:

パラメーター

パラメーター

既定

説明

ロケーション
(location

両方

出力リストを表示するゾーンを指定します。topbottom またはboth でページ ゾーン コンテンツを囲みます。

出力タイプ
(type

list

コンテンツ テーブルのレイアウトを指定します。

  • list – 縦型のリスト (一般的には TOC) を生成します。
  • flat – 横型のメニュータイプのリンクを生成します。例: [Heading 1] [Heading 2] [Heading 3].

セクション番号を表示
(outline

false

見出しにアウトライン ナンバリングを適用します。例: 1.1, 1.2, 1.3.

リスト スタイル
(style

なし

各リスト項目のブレット ポイントのスタイルを指定します。  有効な CSS スタイルを使用できます。 例:

  • none — リスト スタイルの表示なし
  • circle — 丸のリスト スタイル
  • disc — 黒丸のリスト スタイル。一般的な箇条書きリスト。このリストの例で使用しているものです。
  • square — 正方形のリスト スタイル
  • decimal — 番号付きリスト (1、2、3、4、5)
  • lower-alpha — the list is lower-case, alphabetised (a, b, c, d, e)
  • lower-roman — 小文字のローマ数字のリスト スタイル (i、ii、iii、iv、v、vi)
  • upper-roman — 大文字のローマ数字 (I、II、III、IV、V、VI) のリスト スタイル。

見出しのインデント
(indent

 

CSS の数に従って、リストのインデントを作成します。「10px」と入力すると、見出しグループが連続して 10px でインデントされます。たとえば、h 1 の見出しの場合、インデントは 10px となり、h 2 の見出しはさらに 10px でインデントされます。

区切り記号
(separator

brackets

flat 出力タイプにのみ適用されます。リンクの表示スタイルを指定します。 次のいずれかの値を入力できます。

  • brackets — 各アイテムは、角かっこ [ ] で囲まれます。
  • braces — 各項目をかっこ { } で囲む。
  • parens — 各アイテムをかっこ ( ) で囲む。
  • pipe — 各アイテムをパイプで区切る。
  • anything — 入力する値によってそれぞれが区切られます。テキストをセパレーターとして入力できます (例: '***')。カスタム セパレーターを使用している場合、テキストは入力されたとおりに表示されることに注意してください。文字を区切る追加スペースなどは入りません。

見出しの最小レベル
(minLevel 

1

TOC  リストを開始する最大見出しレベルを選択します。  たとえば、2 の場合、h2、h3、および h4 見出しをリストしますが、1 見出しは含まれません。

最大見出しレベル
(maxLevel

7

TOC に含める最小の見出しレベルを指定します。例えば、2 は h1 と h2 をリストしますが、h3 以下は含みません。

見出しを含める
(include

 

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

 

Exclude headings according to specific criteria. You can use wildcard characters. See Sun's Regex documentation for examples of constructing regular expression strings.

印刷可能
(printable

true

既定では、TOC は印刷用に設定されています。このパラメーターをクリアすると、ページを印刷した際に TOC は表示されなくなります。

CSS クラス名
(class

 

お使いの 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
見出しを含める

Favourite.*

見出しを除外する.*Things

スクリーンショット: フィルターされた TOC 'zone' 見出し

フラット リスト

この例では、すべての見出しをフィルターして角括弧で囲まれた "Unknowns" のフラット リストをレンダリングします。

パラメーター
出力タイプフラット
Separatorbrackets
Max Heading Level2
見出しを含める
Unknown*

スクリーンショット: フィルターされた TOC 'zone' 見出し (フラット リストとして表示)


注意

 

コー​​ドの例

次の例は、Confluence ページの基本的なマークアップを調べたり、編集したりする上級ユーザー向けに提供されています。 

マクロ名: toc-zone

マクロ本文: リッチ テキストの利用可

保存形式の例

<ac:structured-macro ac:name="toc-zone">
  <ac:parameter ac:name="printable">false</ac:parameter>
  <ac:parameter ac:name="maxLevel">2</ac:parameter>
  <ac:parameter ac:name="minLevel">2</ac:parameter>
  <ac:parameter ac:name="location">top</ac:parameter>
  <ac:parameter ac:name="type">flat</ac:parameter>
  <ac:parameter ac:name="outline">true</ac:parameter>
  <ac:parameter ac:name="separator">pipe</ac:parameter>
  <ac:rich-text-body>
    <p>Only headings within this block are included in the table of contents.</p>
  </ac:rich-text-body>
</ac:structured-macro>

Wiki マークアップの例

{toc-zone:printable=false|maxLevel=2|minLevel=2|location=top|type=flat|outline=true|separator=pipe}
Only headings within this block are included in the table of contents.
{toc-zone}