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

Iliya Bolotyansky January 19, 2018

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
Answer accepted
Stephen Deutsch
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 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 :)

Iliya Bolotyansky January 19, 2018

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

Stephen Deutsch
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 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
TAGS
AUG Leaders

Atlassian Community Events