Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Confluence User Macro

Neha Sharma
Contributor
November 26, 2018

Hi,

I have a requirement where I need to build up a confluence page based on a given set of data. I explored and found that Confluence User macros can be one of the ways to do so. I'm trying to create a template for the page that I need, whereas I'm confused about one thing - what if I have a list of JIRA ticket links and I want to display these links in a bulleted list format in my user macro. How do I do that ?

Also, I need to embed this user macro into confluence using REST APIs when I create confluence content using api calls. How do I include these parameters in the macro while creating the content using api.

 

Thanks,

Neha

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 26, 2018

Here are the high-level steps.

The easiest way to start is create a page with you links an formatting, then look at the storage format to extract the XHTML of the macro settings. This code will form the basis for your macro.

Assuming you don't want a static list, you can replace any of the parameters in the link macros with user macro parameters to make your user macro configurable.

Then after you test out your macro, you can insert it into a page to see what its storage view looks like (includes its macro parameters). You can use this code for your REST posts.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events