Anchors are used to enable links to a specific location on a page. Anchor links can be especially useful when navigating between sections of a long document, or when you want to link to a segment of a page instead of the top of the page.
Anchors are invisible to the reader when the page is displayed.
アンカーを使用するには次の2つの手順を実行します。
- Create an anchor on the page.
- Create a link to the anchor.
Creating an anchor
Use the Anchor macro to mark the location you want to link to.
- Add the Anchor macro to a page.
- In the Confluence editor, choose Insert > Other Macros.
- Find and select the required macro.
オートコンプリートでマクロを素早く入力する方法
Type
{ and the beginning of the macro name, to see a list of suggested macros. Details are in
Using Autocomplete.
既存のマクロを編集する方法: マクロのプレースホルダをクリックして、[編集] を選択します。マクロのパラメータが編集可能な場合、マクロのダイアログ ウィンドウが開きます。
- Specify the name of your anchor. For example, 'bottom' or 'important information'. See the 'Anchor Name' parameter described below.
マクロ オプション (パラメータ)
Parameters are options that you can set to control the content or format of the macro output. Where the parameter name used in Confluence storage format or wikimarkup is different to the label used in the macro browser, it will be listed below in brackets (example).
パラメーター | 既定 | 説明 |
|---|
アンカー名 | なし | これは、リンクの作成時に使用するアンカー名です。 - アンカー名にはスペースを含めることができます。スペースは、Confluence によりこのアンカーをポイントする URL が作成されるときに自動的に削除されます。
- アンカー名は大文字と小文字が区別されます。リンクの作成では、アンカーマクロの作成時に使用したのと同じパターンで大文字と小文字を使用する必要があります。
|
Creating a link to an anchor
次のものをアンカーのリンク元にすることができます。
- 同じ Confluence サイト上のページ。リンクは、アンカーと同じページ、同じスペースの別のページ、または同じ Confluence サイトの別のスペースのページに作成できます。
- 別の Web ページまたは別の Confluence サイト (専用形式の URL を使用)。
同じ Confluence サイト内からアンカーにリンクするには、次の操作を実行します。
- Select some text or position your cursor where you want to insert the link.
- Choose Link on the toolbar or press Ctrl+K.
Choose Advanced and enter the anchor name in the Link field following the format below.
| アンカーの場所 | アンカーのリンク構文 | 例 |
|---|
| 同じページ | #アンカー名 | #bottom #important information |
| 同じスペース内のページ | ページ名#アンカー名 | My page#bottom My page#important information |
| 別のスペース内のページ | spacekey:page name#anchor name | DOC:My page#bottom DOC:My page#important information |
アンカー名は大文字と小文字が区別されます。アンカー マクロの作成時に使用したパターンと同じ組み合わせで大文字と小文字を使用する必要があります。
- Enter or modify the Link Text - this is the text that will appear on the page. If this field is left blank, the page name or URL will be used as the link text..
- [挿入] をクリックします。
スクリーンショット:リンクダイアログの「詳細」オプション

別の Web ページまたは別の Confluence サイトからアンカーにリンクするには:
次の形式で完全な URL を使用します。
リンク構文 | 例 |
|---|
http://myconfluence.com/display/spacekey/Page+name#pagename-anchorname
| http://myconfluence.com/display/DOCS/My+page#Mypage-bottom http://myconfluence.com/display/DOCS/My+page#Mypage-importantinformation |
完全な URL に関するメモ
- ページ名は、URL 内で # 記号の後に反復されます。2回目のページ名は、すべてのスペースが削除されて単語になります。
- 連結されたページ名とアンカー名の間にシングルダッシュ (ハイフン) があります。
- 完全な URL でのアンカー名は、すべてのスペースが削除されて単語になります。
- アンカー名は大文字と小文字が区別されます。アンカー マクロの作成時に使用したパターンと同じ組み合わせで大文字と小文字を使用する必要があります。
注意
- Table of contents on page: Consider using the Table of Contents Macro to generate a list of links pointing to the headings on the page. The list of links will appear on the page, and will be automatically updated each time someone changes the wording of a heading.
- 見出しへのリンク:ページの見出しへは直接リンクすることができます。リンク関連の作業を参照してください。しかし、見出しが変更されると、直接のリンクは壊れてしまいます。ページのボディ内のリンクを持続させるには、アンカーマクロを使用します。
- サイトのウェルカム メッセージ:サイトのウェルカム メッセージに使用しているページにアンカーを追加する場合、別のページからそのアンカーへのリンクのみ作成できます。そのページ内の内部リンクは機能しません。
- テンプレート: テンプレートのプレビュー時には、アンカーへのリンクは "壊れた" リンクとして表示されます。しかし、テンプレートを使用してページを作成すると、完成したページのリンクは正しく機能します。