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

This widget could not be displayed.

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
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...

477 views 6 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