Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Using relative pages in the Include Page Macro

Steve Wallis August 31, 2021

I have an page that has a Page Properties Macro, that creates a report from pages that have the parent of the 'current pate'.  I want to use that page in the 'Include Page' macro, and create the report for the subpages from the page that has the 'include page' macro - not the page that is included.  Is there any ay to do this?

Using Excerpt and Excerpt Include doesn't appear to work either.

2 answers

2 votes
Katerina Kovriga _Stiltsoft_
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.
August 31, 2021

Hi @Steve Wallis ,

Please can you give more details about the case? 

You have a page tree with a parent page where you keep the Page Properties Report macro that collects data from all the child pages? 

And there are several similar Page Properties Reports which you want to collect into one big table?

Our app (Table Filter and Charts for Confluence) provides the Table Excerpt/Table Excerpt Include macros that work with dynamic Confluence macros perfectly well and can collect multiple-row tables.

Steve Wallis September 2, 2021

Not quite.  I have pages that all have sub-pages.  We occasionally add sub-pages, so the list of the sub-pages is not static.

I have a Page Properties Report macro on each of the pages, that creates a 'report' from the information in the sub-pages.  So I can now see the sub-pages for a page, the approval status for each sub-page, and when it was last modified (along with other information).  The Page Properties Report macros are all coded to gather data from 'current page'

 

When we add sub-pages, we occasionally need to change the Page Properties Report macros to gather the data.  Currently, we have to do this in every page.  We are looking to make this easier by using an 'include page' type functionality so when we change it once, and it gets propagated to all pages automatically.

Katerina Kovriga _Stiltsoft_
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.
September 2, 2021

Oh, I see now, thanks for the clarification.

0 votes
Nic Brough -Adaptavist-
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.
August 31, 2021

The include and include-excerpt functions relies on the unique page name, not the nesting of pages and a pointer to a relative that could disappear without warning or reference.

I can't think of a way to specify ../../othertree/page-x in a way that would not break if the target were renamed or moved (using the unique name or reference to a page rather than the position in the tree retains the link on rename or move)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events