Forums

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

How to add additional parameter to the macro?

Yagnesh Bhat
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.
September 1, 2021

I have a macro written as a part of confluence server plugin that originally accepted only one parameter. Now that macro is used everywhere in several confluence instances.

There is a need now to add an additional parameter. So I tried updating atlassian-plugin.xml like so, simply copying the attributes of the original first parameter:

<parameters>
<parameter name="originalParameter" required="true">
<option key="showNameInPlaceholder" value="false"/>
<option key="showValueInPlaceholder" value="false"/>
</parameter>
<parameter name="newParameter" required="true">
<option key="showNameInPlaceholder" value="false"/>
<option key="showValueInPlaceholder" value="false"/>
</parameter>
</parameters>

The problem is only the originalParameter is seen in the page's storage format, the newParameter is not seen. Further how do I ensure that the already existing macros are aware of this new parameter?

1 answer

1 vote
Alexis Robert
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 8, 2021

Hi @Yagnesh Bhat , 

 

from what I understand, you are dealing with a Macro Plugin and not a simple User Macro. 

The documentation for User Macro explains how to add parameters if this is indeed what you want to do.

However if you do need to update a Plugin Macro, I would suggest asking your question in the Atlassian Developer community as you might have more answers there : https://community.developer.atlassian.com/c/confluence/6

 

Let me know if this helps, 

 

--Alexis

Yagnesh Bhat
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.
September 8, 2021

@Alexis Robert , thanks for the suggestion. Yes, I will ask such questions in the Developer community going forward - for now, this is no longer needed, but thanks for suggesting the Developer community link, that will really help me.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events