Confluence CLI: How can I replace Page Tree macros with Children Display macros?

Hi,

I'm new to Confluence CLI, and would like to replace Page Tree macros with Children Display macros across a Confluence space. Is there a CLI query that can do it?
I was looking at https://bobswift.atlassian.net/wiki/spaces/CSOAP/pages/48398579/How+to+Globally+Search+and+Modify+Content
But it's not clear to me how the Page Tree to Children Display replacement would be written as a query.

Thanks,
Iliya

1 answer

1 accepted

Accepted Answer
2 votes
Stephen Deutsch Community Champion Jan 19, 2018

You could do something similar to Example 2 on the page that you linked to.

What you are doing is changing the storage format, which you can view by clicking "View Storage Format" under the ••• Menu. You will see what you need to change is

ac:name="pagetree"

to

ac:name="children"

and you should be able to use the example provided there.

Another option you have is to install this user macro:

https://streamline.atlassian.net/wiki/spaces/STRMLN/pages/5144578/Search+and+Replace+User+Macro

that allows you to have a preview of what you're going to search/replace. That might be easier for you :)

Thanks very much, Stephen! I tried your user macro, and it worked.

Stephen Deutsch Community Champion Jan 19, 2018

Glad to hear! If you found my answer helpful, please click on the checkmark next to my answer ;)

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Thursday in Marketplace Apps

You + one app + a desert island...

Hi all! My name is Miles and I work on the Marketplace team. We’re looking for better ways to recommend and suggest apps that are truly crowd favorites, so of course we wanted to poll the Community. ...

133 views 3 4
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