Macro / User Macro copy page button

Alexander Wirtz
Contributor
November 30, 2021

Hello Community,

I would like to have a macro that copies the current page and pastes it under the current page. 

Ideally, you can give it a date and a number in a popup menu beforehand, which will automatically generate the title.

It is not possible for us to simply use a blueprint for this, because there will be constant changes to the mother page, by several users.

Do you know a macro that can do this, or can you help me to create a user macro?

Kind Regards Alex

1 answer

0 votes
Bill Bailey
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.
November 30, 2021

Well I can help you with the capability question, but writing one is a bit complex. THe first thing to understand is that user macros are generally server side, and are rendered when a page is rendered. BUT you do have the option of including Javascript that can be run client side (via a page on the button).

Then via REST calls you can do what you want. I have a macro that something similar in that it renders a button, that when pressed generates a PDF, cleeans a file name, writes that file as an attachement to another Confluence page, and even shots a copy to our website. 

Because my user macro skills are limited to Velocity and CSS knowledge, I had to get outside help on the script. ;-)

Alexander Wirtz
Contributor
December 6, 2021

Thank you for offering help! I will solve my problem differently. Thank you! :)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events