We use the "Include Page" macro extensively in Confluence for managing content that needs to be consistent across our documentation such as product names and common instructions. Sometimes when editing an included page, it's useful to see where the page is included. Is there any way to search within Confluence for where a page is included? Is there a plugin that provides this sort of advanced search?
I would write a macro. Here are the steps that should help you get started:
1. Get the root page of the space.
2. Load a sorted list of all child pages. Each page will be a ContentEntityObject. API details here: http://docs.atlassian.com/atlassian-confluence/latest/com/atlassian/confluence/core/ContentEntityObject.html
3. Iterate over each page in the list.
4. On each iteration, call the getAttachmentsNamed() method on the page, and pass in the current page's name as the String argument. See the API for more info: http://docs.atlassian.com/atlassian-confluence/latest/com/atlassian/confluence/core/ContentEntityObject.html#getAttachmentNamed(java.lang.String)
You know what, I think I misread your original post. Not sure if there's a way to find included pages (at least, not as attachments). There are a bunch of isIncluded() and similar sounding methods in the API, but without much doc on them, it's hard to tell if any would work.
Just came across this post while looking for something else.
If you're willing to do manual work then you can do a search for any macro by doing a search for "macroName: include*" - note that this is case-sensitive. It will list every page which uses that macro. You can't, AFAIK, add parameters (e.g., which specific include page you're looking for), but at least you can find out every page that has an include.
I'm sorry I have no answer to the question, but wanted to bump it up in case anyone else out there has found a workaround solution.
We're placing images and video content in an 'Inclusion Library', as suggested by Sarah Maddox in her book 'Confluence, Tech Comm, Chocolate', but what is not covered in the book is what to do when you update the page in the Inclusion Library. In other words, how do you ensure the updated content is still relevant to the pages where it has been included?
We need to find out where a page has been included. Can anyone help with this please?
In case my solution is useful to anyone else, I wrote my own "search engine" in python using the XML-RPC API to index content from all pages. It has a simple web interface that links to all pages that include a given target page.
I'm sure there's a more efficient way to do this with a Confluence plugin (or Gadget?), but I haven't yet figured out where to get started with that.
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
To anyone who doubts that Atlassians are a little too obsessed with collaboration, and tools related thereto, let me describe a recent discussion we had (which took place on our internal Confluence, ...
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!
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