Adding an Anchor- Go to "Insert Macro"
- Select "Anchor Macro"
- Enter anchor name (For example, '' or 'important information')
Creating a Link to the AnchorLink to an anchor anchor on the same Confluence site: A. Same Page - Go to "Insert Link"
- Choose "Advanced"
- User "#" before the anchor name
B. Different Page - Go to "Insert Link"
- Choose "Advanced" and
- Select some text or position your cursor where you want to insert the link
- Choose Link in the toolbar or press Ctrl+K
Choose Advanced and enter the anchor name in the Link field, following the format below. Anchor location | Link syntax for anchor | Examples |
---|
Same page | #anchor name | #bottom #important information | Page in same space | page name#anchor name | My page#bottom My page#important information | Page in different space | spacekey:page name#anchor name | DOC:My page#bottom DOC:My page#important information |
- Enter or modify the LinkText (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)
- Choose Save
the "Link" field- Enter or modify the Link Text
- Save
- Anchor names are case sensitive
- Enter page and anchor names with spaces when you link to them in the same Confluence site
- If you're linking to an anchor on a different page that has special characters in its name, where the URL displays a page ID rather than a name, you should still enter the page name when linking to it
Screenshot: The 'Advanced' option in the link dialog Image Removed
Link to an anchor from another web page or another Confluence site: Use a full URL in the following format: Link syntax
| Examples |
---|
http://myconfluence.com/display/spacekey/pagename#pagename-anchorname
| http://myconfluence.com/display/DOCS/My+page#Mypage-bottom http://myconfluence.com/display/DOCS/My+page#Mypage-importantinformation | Notes about the full URL: - The page name is repeated in the URL, after the # sign. The second occurrence of the page name is concatenated into a single word, with all spaces removed.
- There is a single dash (hyphen) between the concatenated page name and the anchor name.
- The anchor name in the full URL is concatenated into a single word, with all spaces removed.
- The anchor name is case sensitive.
- If the page name contains special characters, where the URL displays a page ID rather than a name, the link to an anchor will look more like this
http://myconfluence.com/pages/viewpage.action?pageId=54689987#Test-page1!-anchor In this example the page title is Test - Page 1! and the anchor name is anchor .
Notes- Table of contents on a 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.
- Linking to headings: You can link directly to the headings of a page. See Links. However, if someone changes the wording of a heading, those direct links will be broken. Use the Anchor macro to ensure a lasting link within the body of a page.
- Site welcome message: If you are adding an anchor to a page that you are using in the site welcome message, you can only link to that anchor from another page. Internal links within that page will not work.
- Templates: When you are previewing a template, a link to an anchor is displayed as a 'broken' link. However, when you create a page using the template the resulting page will have the correct link.
Internal LinksLink to an anchor on a page On the same page To link to an anchor on the same page, open the link option in the editor and choose the "Advanced" option. Use "#" before the anchor name (case sensitive) to create the link to the an on-page anchor. This link is an example of linking to an anchor on the same page. It will take you to the "Next Step" section at the bottom of the page, where an anchor named "Next" is located.- Go to "Insert Link"
- Choose Web Link and add a full URL
On a different page To link to an anchor on another page, you will need a specific syntax. This link is an example of the following syntax for linking to an anchor on another page: The page name is repeated in the URL after the "#" (without any spaces or punctuation), and then followed by a dash and then the name of the anchor. Special Characters If the name of the page you are linking to contains special characters, where the URL displays a page ID rather than a name, the link to an anchor will be a combination of the page ID and the page name, as follows: For the page "Test - page 1!" containing a tab named "anchor" the URL will look like this: UTF-16 Characters If the page name contains UTF-16 characters (eg. Simplified Mandarin, Katakana) then it is necessary to add "id-" into the URL before the second instance of the page name, as follows: For the page "ページ" containing a tab named "High Level Comparison", the URL will look like this: Note: You can retrieve the page ID from the address bar when the characters are not ASCII. External LinksLink to an anchor |