How do I use Anchor macros in conjunction with the Page Properties Report macro? Edited

I have several pages that each have many Page Properties macros and I'm using a Page Properties Report macro to bring all of their relevant data together on a different page, we'll call it Main.  The format of the child pages is a Page Properties macro followed by an Anchor macro followed by a Collapsible Block macro.  None of these macros are embedded in one another, to be clear.  Just that sequence of 3 macros following each other over and over again.

My goal is to embed a link to the Anchor in the table of the Page Properties macro such that when viewed as part of the Page Properties Report macro on Main, I can link back to the specific space for that specific item on its child page.

The issue I'm running into is this - Confluence is trying to be "smart" when I create my link.  The proper format for the link should be 'child page name#anchor name'.  However, since I'm already on 'child page name' when I'm creating the link, that part is automatically removed by Confluence such that when I edit the link afterwards the text is just '#anchor name'.

How do I force Confluence to stop trying to help me here and not strip the text it deems unnecessary (because the links that get pulled into the Page Properties Report macro don't work)?  Or is there another way to go about accomplishing my goal with other macros?

Many thanks in advance!

2 answers

Just a hint: Try writing a user macro which creates the anchor link inside the page property macro. I did something similar listing page attachments as a simple unordered list inside a page property macro: the result is a page property report which list all pages with the attachments in one table. Try the Confluence Source Editor add on to get the idea of the code a macro creates. Your user macro should just be a link to the current page  added with a #anchor link.

Have you figured this out? I am looking to do something similar.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Friday in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

271 views 11 10
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