Solution for "flexible" hyperlinks (absolute -> relative): Need different url for a) sub page and b) sub page within parent page

Hello,

I have three documents

  • one parent page and
  • two included sub pages
    • sub page A
    • sub page B

sub page A has a hyperlink to (a headline within) sub page B.

This hyperlink should be "flexible" in the following sense:

  1. When I open sub page A and click the hyperlink it should go to to sub page B
  2. When I open the parent page (which has sub page A included) and click the same hyperlink now it should stay on the parent page and just jump to the right space of the included sub page B

Obviously

  • version 1 works with [name of sub page B#name of headline]
  • version 2 works with [name of parent page#name of headline] or [#name of headline]

Is there some solution that can unite these two different URLs, perhaps a macro that can be included into the parent page and just filters out the first part of all hyperlinks?

Thanks

1 answer

That is probably a little too far fetched. So let's consider this one closed.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

975 views 23 12
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