It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Automatically include/merge documents in a folder (with the same parent)

Pietros May 21, 2015

Hi,

I have been using Confluence (also) for reporting - our workers use a template and fill it in. However, then someone needs to manually merge the files.

Is there a way I could, on another Confluence page, display all pages with certain parent? But the name cannot be hardcoded as the parent folder name contains currentDate.

An example:

  • Parent-WorkLog 12-12-2012
    • Worker A  (some tables)
    • Worker B (some tables)
    • Worker C (some tables)

And I would need to have another page that would contain Worker A, Worker B, Worker C tables (everything as in include) but on a single page.

 

EDIT: What about custom Macro? Would it not be possible to simply iterate through children of a parent and merge/join/append their content into a new page?

 

1 answer

0 votes
Nic Brough [Adaptavist] Community Leader May 22, 2015

>But the name cannot be hardcoded

The child macro can do it, but that "cannot be hardcoded" breaks everything.  If you can't tell Confluence which page to start from (i.e. by "hard coding" it), then there's no way it can possibly know what you actually want.  A bit like asking me how old my cat is.  Which one?

If you have some form of pattern or rule, then you need to code for that arbitrary rule - at the very least, you;ll need to write something that can work out what your arbitrary rule results in before you can feed it into any macro.  I think that's pretty much the conclusion you've already reached though.

So, my instinct would be to attempt a "user macro" to do the calculation and push the result out through a "child page" macro.

Pietros May 22, 2015

Thanks. I would need something like "getParent" and then "getAllChildren" and iterate through the children, appending content of each individual one to a new page. I have no experience with user macros, though. I have been a developer but never worked with Confluence at this level.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Confluence

6 Awesome Ways to Apply Trello, JIRA and Confluence to your Project

I attended  Atlassian Summit 2019  and learned a lot from the presenters, attendees and knowledgeable Atlassian product managers. The presentations I attended focused on applying Agile, pla...

2,115 views 11 27
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you