I have a Confluence (Server, 6.7.0) page with the title "5 Information security policies". (Yes, with a "hardcoded" heading number... possibly too much information: this heading is a "control" from ISO/IEC 27001:2013 Annex A.)
The page contains the heading "5.1.2 Review of the policies for information security". (If Confluence supported search'n'replace across pages out of the box, I would consider chunking the page so that this "5.1.2" heading was its own page, and the problem I'm having would evaporate. But that's another discussion.)
I've inserted an Anchor macro, with the anchor name "5.1.2", at the start of that "5.1.2 ..." heading.
Here's what I did to create a link to that anchor (that heading) from another page in the same space:
When I view the saved page and inspect the resulting link, here's the URL (I've replaced some strings with "..."):
http:// ... /pages/createpage.action?spaceKey= ... &title=5+Information+security+policies&linkCreation=true&fromPageId=...
Clicking the link creates a new page, which is not what I want.
How do I create a link to the anchor? What am I doing wrong?
Is there is an issue with the periods in the anchor?
The full answer is in the anchor documentation. There are different syntaxes according to whether the anchor is on the same page, same space or different space.
Good to hear, - no worries that's what the community is all about :) helping and sharing experiences we made.
As you can imagine from what I've written - I've made similar experiences like you when setting anchors ;)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the suggestions.
I'm embarrassed to admit that it was user error: my problem.
Yes, I selected "5 Information security policies#5.1.2" from the autocomplete entry that my browser (Chrome) displayed under the Link input text box, but a page with that title no longer existed. I'd forgotten that I'd appended a string in parentheses to the end of that page title: so the actual current page title was "5 Information security policies (...)#5.1.2" (I've used "..." instead of the actual string, which I don't want to show here).
I can't blame Confluence for that autocomplete entry; that's browser behavior, not Confluence.
You were right:
maybe '5 Information security policies' is a page that doesn't exist
Thanks again!
Apologies to all for my misleading "report".
P.S. I was initially nervous when the working URL showed the page title in the hash:
http:// ... /pages/viewpage.action?pageId=50332014#id-5Informationsecuritypolicies(...)-5.1.2
but I needn't have worried. When I edited the destination page, and changed its title, and then refreshed the page containing the link (in another browser tab), Confluence had updated the hash to reflect the edited page title. Phew.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What just came to my mind right after my reply - is the page you create the link in the same space? Maybe you have to put the spacekey also in
XXX:5 Information security policies#5.1.2 (spacekey:page name#anchor name)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
did you try to remove the anchor and link directly to the heading?
I'm not sure what you mean by autocomplete - but when you open
Insert link -> Advanced
you should just fill in
5 Information security policies#5.1.2 (page name#anchor name)
in the first box.
Second box would be link text you marked!
Awesome security information (Text shown on site)
I made the experience when a page doesn't exist or the user doesn't have access rights the createpage action is made instead of viewpage -> a hint for that would be the underline and changed color for that. (and maybe '5 Information security policies' is a page that doesn't exist?)
I would first try to set a link directly to the page -> in Edit mode press [ than start typing 5 Inform... -> if it doesn't autofill, page name is not correct.
Try to add the link like written on top.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.