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
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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

360 views 4 10
Read article

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