Anchor Macro
Allows you to link to a specific part of a page. Add macro to the spot on the page you want to link to. Once the page has been published, you'll be able to link to the anchor. For more information on using anchors see Anchors.
The example below shows an example of an Anchor macro as it appears in the editor, and as it would appear to someone viewing the page.
- Anchor macro as it appears in the editor
- Anchor macro as it appears when viewing a page (it isn't visible).
Using the Anchor macro
To add the Anchor macro to a page:
- From the editor toolbar, choose Insert > Other Macros
- Find and select the required macro
Speed it up with autocomplete: Type { and the beginning of the macro name, to see a list of suggested macros. In this example we're inserting the cheese macro.
To edit an existing macro: Click the macro placeholder and choose Edit. This will open the macro details, so you can edit the macro parameters.
Macro options (parameters)
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
).
Parameter | Default | Description |
---|---|---|
Anchor Name | None | This is the anchor name that you will use when creating the link.
|
Wiki markup example
This example is useful when you want to add a macro outside the editor, for example as custom content in the sidebar, header or footer of a space.
Macro name: anchor
Macro body: None.
{anchor:here}
Linking to an anchor
You can link to an anchor from:
- A page on the same Confluence site. The link may be on the same page as the anchor, another page in the same space, or a page in another space on the same Confluence site.
- Another web page or another Confluence site, using a specifically formatted URL.
See Anchors for more information on link syntax.