Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Is there a way to use Velocity to set the default Output Type of a user macro to be BLOCK instead of INLINE?

Roy Lu May 18, 2016

I am creating a user macro, and I want to default its output type to BLOCK instead of INLINE.

I can achieve this by adding the following parameter to the user macro template:

@param atlassian-macro-output-type:title=Output Type|type=enum|enumValues=BLOCK|required=true

However, this will always open the macro detail window (where you can set other parameters) every time a user insert this macro due to the "required=true" value, but if I remove it, the parameter won't work. I want a user macro that can be directly inserted as BLOCK without having to go through the macro detail window.

So I am wondering if I can use Velocity in my macro template to set the default output type to BLOCK?

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Davin Studer
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.
May 26, 2016

Have you tried required=false? What version are you using by the way? I'm on 5.5.6. The reason I ask is because when I try that as a user macro parameter it is always set back to inline when I save the macro parameters. It only works for toggling between inline and block for me by using the buttons that show up when you click on the macro.

Roy Lu May 26, 2016

Yes, I did, which will cause the issue that you described. So it has to stay true. That's why I am trying to find other solutions, like using Velocity.

TAGS
AUG Leaders

Atlassian Community Events