Anchor Macro

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

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. 

  1. Anchor macro as it appears in the editor
  2. 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:

  1. From the editor toolbar, choose Insert > Other Macros
  2. 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.

  • The anchor name can include spaces. Confluence will remove the spaces automatically when building a URL that points to this anchor.
  • The anchor name is case sensitive. You must use the same pattern of upper and lower case letters when creating the link as you used when creating the Anchor macro.

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.

Last modified on Nov 4, 2019

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.