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

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

This widget could not be displayed.
Daniel Eads Community Champion Jul 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

This widget could not be displayed.

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.

This widget could not be displayed.
Daniel Eads Community Champion Jul 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)
This widget could not be displayed.

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.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

399 views 4 6
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you