Why can't I create links to headers on the same page?

Tony Collins
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!
July 28, 2015

No matter what I do, I cannot get links to headers on the same page to work.  Same is true for links to anchors.  I can enter the values in Link dialog, but the resulting link does not allow me to go actually go anywhere.  The only available fields in edit more are "Edit" and "Unlink".  The "Go To Link" button is grayed out.

Also, typing "[" in the editor field gives me an error rather than showing possible link candidates.  The error is

The markup provided is not valid link markup

Is there some configuration or permission needed in order to create intra page links?

4 answers

2 votes
Ronalds Tilcēns
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 28, 2018

We are using Atlassian Confluence 6.8.0 and I can simply type [#header_title] to place a link to any header on the same page.

2 votes
Daniel Eads _unmonitored account_
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.
July 29, 2015

Hi Tony,

You can use the Table of Contents macro to help you retrieve what the anchor URL for a header is. Just insert a table of contents macro and hover over the link it generates to fetch the URL you'll need to use. In the image below, you'll use the portion after the hash, but put in a hash (#) of your own between the page name and the section you want to link to.

image2015-7-29 12:32:40.png

For example, to make a link to this section from another page I would use UsefulSQLQueries#Read-onlyqueries as the Link.

Here's the basic rules of using Anchor Links on a different page than where the section you're linking to exists:

  • The page title and section are case-sensitive
  • Spaces are stripped. Hyphens are not.
  • Any header level is a valid anchor

------------------------------------------------------

You asked specifically about creating anchor links on the same page. It's much easier to do that than links from a separate page. The same rules apply:

  • Case sensitive
  • Spaces are stripped, hyphens are not
  • Any header level is a valid anchor

Consider a page (the title doesn't matter if the link is to the same page) where I have a section called "July 2" which would look like this on the page:

July 2

To make a link to this header in the link editor, I just strip the space out between the words and throw a hash in front (generically #SectionTitle ):

image2015-7-29 12:51:30.png

1 vote
Tony Collins
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!
July 29, 2015

Unfortunately, this isn't working.  The section header references still don't generate working links.  When I put a ToC on the page, I notice that it doesn't appear that those links work either.  Not sure what's going on here.

0 votes
Daniel Eads _unmonitored account_
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.
July 31, 2015

If you're still having trouble and even the Table of Content links aren't working, I'd: 

  1. Try with a different browser, just for kicks
  2.  Open an issue at http://support.atlassian.com describing the problem and what browsers you used (you could even link back here to describe what you tried)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events