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

2 votes
Accepted answer

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.

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 Tuesday in Statuspage

Introducing Statuspage Getting Started guides! First up: What is Statuspage?

Over the next several weeks we'll be sharing some of our Getting Started guides here in the community. Throughout this series of posts, we'd love to hear from customers and non-customers ab...

185 views 4 1
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