How can I link to a heading within a page in Confluence?

Ross LeMere October 29, 2019

Hi,

 

My team recently started using Confluence and one of our programmers was looking to link to a heading within a page they have created. 

For example, there is a heading within the page called "Specifications" and in the body of a section "specifications" was mentioned.  We want to be able to link "specifications" to the "Specifications" header for easy maneuverability on the page. 

After looking through countless resources regarding macros and anchors we have not been able to figure out how to do this.

 

Any help is greatly appreciated!

 

Thanks

4 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Answer accepted
Heth Siemer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 29, 2019

Anchors is the easiest way to do this, so maybe I can provide some clarity on how?

Place the anchor macro on the line ABOVE where you want to link to. Give the anchor an ID easily remembered (caplitalization matters). I would use specifications for this. In this example I used top:

anchormacro.png

When you add a link to a word using the Insert Link function, you can put in #specifications (or in this case #top) as the anchor link. When you save the page you should see the functionality you are looking for.linkdialog.png

 

To link to an anchor on another page use the page's URL and add #anchorname to the end (i.e. example.atlassian.com/display/CUSTCARE/Customer+Care+Home#top)

Anchors don't play nice with AUI Tabs, and this is to be expected as the tabs use anchorlinks to navigate. Anchors will not work past the first tab.

Ross LeMere October 30, 2019

Hi Heth,

Thanks for the detailed response.

My only issue is that I don't see the Anchor Macro anywhere.  Is this something I need to add manually?

Ross LeMere October 30, 2019

Sorry for the double reply, but after looking at some other Community posts about Anchors it seems like they aren't working or have been removed.

The linkable headers feature is apparently "replacing" anchors, but I don't see the option to do linkable headers in our Confluence...

Heth Siemer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 30, 2019

Anchors are being removed?!?!?!

 

After doing research... this is a cloud "feature"

Ross LeMere October 30, 2019

Yeah it appears so...I got the Linkable Headers thing figured out.

Not sure if this is a bug or not, but you can't actually get the link for a header unless you are viewing the page...doesn't make a lot of sense because if you are trying to create links within the page then this requires to Publish the page, get the header link, go back into editing the page, and create the link.

Like Jill Armitage likes this
Ian Thompson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 16, 2023

Gave this a try and it works great.  Thanks for the info.

Stephan Georgiev-Ashkenazy August 24, 2023

Of course it works wonderful at my side.

Will Clegg
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 28, 2024

Thanks @Heth Siemer this worked a treat.

The only thing to note is that it doesn't seem to work for the shortened Confluence URLs (e.g. https://abcco.atlassian.net/l/cp/abc123bbv) which can be generated through Share->Share Page->Copy Link

Screenshot 2024-08-28 at 11.49.39.png

Jill Armitage
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 5, 2024

Thanks @Ross LeMere ! Brilliant. Just what I needed. I searched for "deep links" and luckily this thread came up. Thanks again!

2 votes
Herve Frydlender
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 30, 2019

Hi,

All headings are by default "tagged" without a need to insert an ancor.

To know what shall be the link to refer to, you can 

  • inspect the html code with your browser (select, right click, "Inspect" in Chrome)
  • insert a "Table of Content" macro in your document. The table is a set of links to your headers.

Once you have the tag, insert the link as Heth explained :)

Regards

Patrick O_Connell July 6, 2021

@Herve Frydlender, in that replay, don't you kind of have those steps backwards?

0 votes
Stephan Georgiev-Ashkenazy August 24, 2023

Hi Friends,

The point is that I am looking for a solution to take me from the bottom of the page to the top, but displaying as well the page summary/title. And here the problem is that the anchor macro starts only in the body of the document - it couldn't be located in the title row.image.png

The solution that I found at least is to have the link to this specific page and to use it in the link at the bottom of the page, which should take you to the top. But the problem with this solution is that each time you click on this link, the page is fully reloaded and it takes some time. Instead of jumping fast and easily within the HTML content of the page.

image.png

Hope that you will find my reply useful.

KR,

Stephan

0 votes
Kyle Andringa
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 18, 2022

I think this is what you're looking for.  It causes each heading to have a paperclip icon when you hover over it.  You can then click that icon to get a link, which allows you to point your colleagues to a specific location.  IMO, essential functionality that you shouldn't have to install a plugin for.

Clickable Anchors | Atlassian Marketplace

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events