• Community
  • Products
  • Confluence
  • Questions
  • How does one link to anchors on pages that don't have a "name", but are only shown with a pageId (viewpage.action?pageId=###### - that's all pages with non-latin titles and so on)?

How does one link to anchors on pages that don't have a "name", but are only shown with a pageId (viewpage.action?pageId=###### - that's all pages with non-latin titles and so on)?

Victor Dulepov December 21, 2015

This question is in reference to Atlassian Documentation: Working with Anchors

Ask your question here...

2 answers

1 accepted

0 votes
Answer accepted
Stephen Deutsch
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.
December 22, 2015

If you take a look at the page source, it seems like pages with special characters build their anchors the exact same way as normal pages: #<nameofpagewithoutspaces>-<headingwithoutspaces(or defined anchor name)>

Victor Dulepov December 22, 2015

Ok I see. So is there a way I could generate that <nameofpagewithoutspaces> part, knowing the actual page title/name (urlencode, or whatever)? It's a blog post, so it never gets shown with a "pretty URL", only with a viewpage.action one.

Victor Dulepov December 22, 2015

Nevermind, used an ugly hack: temporarily inserted a link to that anchor on its own page and took the generated value of the anchor id therefrom. Thanks everybody, case closed.

0 votes
Guilherme V.
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 22, 2015

Hey Victor,

If the page's title is using a special character, Confluence will change the link for the pageID information as it's stated in the following article:

Cheers,

Victor Dulepov December 22, 2015

Thanks Guilherme, but my question was not "what happens when page title contains special characters?", but "How does one link to anchors on such pages?" - and that remained unanswered. The regular way did not work - "Working with anchors" suggests me linking to the page using Confluence's regular URL syntax (http://myconfluence.com/display/spacekey/pagename#pagename-anchorname), which is simply non-feasible: all of my page titles contain non-latin (Cyrillic, to be more specific) characters, so these pages are only shown as viewpage.action URLs, they have no pretty URLs at all. I tried adding the anchor directly to the page URL (http://my.confluence.domain/pages/viewpage.action?pageId=12345678#my_anchor), and that also did not work - the page opened at the top, not at the anchor's position. Oh, another point to consider: that page is actually a blog post.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events