Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Some anchors not working, others working, besides doing the exact same thing on both.

Fionn Mcknight
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!
January 7, 2019

Hi.

 

So I have a page with a number of headers. Header4's. 

 

At the begging I'm trying to link to each of these headers.


So I select the header, click 'Insert Link', and type #anchorname.

 

Then I go to my list at the start, select the 'paragraph' text I would like to linkify. I click 'Insert Link' and type in #anchorname, and leave the text as it is.

 

This has worked sporadically. For some of the headers it works fine. For others it just doesn't work. The URL changes, but the page doesn't scroll, and opening it in another tab it still doesn't go to the correct heading.

 

So for example this works "url/url/#OptumIQStudio-WorkbenchDeveloperGuide(DRAFT)-CLIUserGuide"

 

But this doesn't.

"url/#OptumIQStudio-WorkbenchDeveloperGuide(DRAFT)-dswuserguide"

 

I've tried using everything. Removing the header, adding it again, using different text, using spaces, not using spaces, using caps not using caps, there just doesn't seem to be any logic to it. Some anchors work, others won't no matter what I do.

 

Any ideas what's going on? 

2 answers

0 votes
Tobias Anstett _K15t_
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.
January 7, 2019

Hi @Fionn Mcknight,

The urls you are posting look like links to heading names as Confluence constructs them. In general this approach is likely to break when renaming pages or the headings itself.

What @Bill Bailey is refering to is another mechanism of dealing with links to headings using the anchor macro. You will need to insert the anchor macro directly after the heading text in the same line. Each anchor macro asks for an anchor name you can define and which does not change if you do not explicitly decide to - this adds the missing stability. Let's assume you choose "myAnchor".

When inserting a link you will need to select the "Advanced" tab and enter "#myAnchor" in the "Link" field.

Hope this clarifies and helps :)

0 votes
Bill Bailey
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.
January 7, 2019

You create anchors via Insert other Content -> other macros -> anchors. Are you entering them that way?

And are you trying to link to content on the same page, or externally? If on the same page, be sure you are using the advanced tab on the Insert Link menu and just entering #anchorname there.

It is also the same tab for entering a link from one Confluence page to another (different syntax).

Fionn Mcknight
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!
January 8, 2019

Thanks, this is a much better way of doing it.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events