It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Macro copy page with dialog - how to

I'd like to create a user macro allowing to mimic the copy page behavior in Confluence. This is needed to allow controlled page copies performed by team members. For internal reasons the templates are difficult to use for us. 


Macro should have different parameters

- page to copy

- page Title

- target space

- parent page

Display the link in for of a button (using button class 

Is this achievable? I'm facing issue in the URL construction

Thank you

1 answer

0 votes
Dominic Lagger Community Leader Apr 07, 2020

Hi @Jean-Michel Rottiers 

The macro itself with these parameters shouln't be a problem. I see a challenge in the copy process. As far as I know, there is no copy function in velocity. So you would have to do it with REST API. And also there is no copy function. That means, you have to get the content and create a new page. 

The other thing is, you have to do it with velocity and Javascript in the user macro browser (Another challenge). A good example for creating a new page is here: Confluence REST API example. (In the middle is the section "Create a new page (jQuery)"). Be careful with the login credentials. 

Another negativ impact would be: The user clicks the button and nothing happens... because the new page was created in the background. 

It might be, there is an easier way to do this, but I can't remember any... 

My Questions:

Did you try something already, Did you have any success? You wrote, that you have a problem with the URL construction. What do you mean with this? 

Hope this helps

Regards, Dominic

Thank you for your reply I was playing with different parameters one user macro but I was not able to properly construct the URL with the parameters.
I will stick to the native feature and instruct my users to use it following a standardized procedure.


Thank you

Like Dominic Lagger likes this

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Confluence

Lessons and Learnings: Six Months of Working Remote [Discussion]

Hey there, folks! For most of us, the past six months- yes, you read that right- have been a journey. More people than ever before have pivoted to working remotely, and navigating being on-scre...

8,532 views 6 6
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you