Forums

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

Can connect two macros to one?

Tony Montana
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 21, 2021

Hi there! Can I connect two macros to one button? For example.

For example. I need to add an Expand macro and inside the Noformat macro in one action. Is it possible?

2 answers

0 votes
WW
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 23, 2021

Adding an Expand macro inside of a No Format macro wouldn't work since the No Format macro would take away anything but text that's in the macro's body.

In fact, Confluence won't even let you add the Expand macro inside the No Format macro.

For this kind of thing, you don't really need to ask a question to the Community for, though, because it's very easy to test on a Confluence page, and you'd have your answer in <1 min.

Tony Montana
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 25, 2021

@WW facepalm)))) I want to add NO FORMAT to Expand macro, not expand to no format :DDD WTF this scooby di)))

WW
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

I'm not sure exactly what you meant by all of that and if you're saying you were at fault in your question or that I misunderstood you.  From what I read, you wanted to put the Expand macro inside of the No Format macro.

All you have to do is put the No Format macro inside of the Expand macro. 

I'm not sure what you mean by using buttons to put a macro inside of a macro.  If you mean you want a pre-packaged macro, then @Bill Bailey is correct, you'd need to customize something.

Confluence doesn't so what you want it to do out of the box since there could be millions of combinations of nested macros.

If you don't want to write your own user macro and you use those two macros all the time, then I recommend copying and pasting.  That's about all you can do since this is not a built-in feature of Confluence.

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 21, 2021

Typically that option is referred to as nesting. And yes you can nest macros inside of other macros generally. There may be times when some functionality is lost, but your example should work without any issues.

Tony Montana
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 23, 2021

Thank you for answer. Can you tell me more about "nesting",

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 23, 2021

Placing one or more macros inside another is referred to nesting. Like an egg inside a bird's nest.

Like Tony Montana likes this
Tony Montana
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 24, 2021

@Bill BaileyThank you. And, how can I place 2 macros clicking by 1 button?

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 24, 2021

Not sure what you mean with one button. The proceedure is you need to insert the parent macro on the page first, then place/insert the nested macro inside the parent macro.

Tony Montana
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 25, 2021

@Bill Bailey I want to do two things for the price of one, you know?

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 25, 2021

Sorry Viktar, still not clear what you want to do. Nesting of macros is the way to go. OR if you want something more complex withing a single macro, then you need to write a uer macro. There you have much more control.

Tony Montana
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, 2021

@Bill Bailey Do you know automation? Why press two macros all the time when you can press one macro or button and get the result with two macros per page?

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, 2021

Sure, then what you want to do is to write a user macro to do what you want. Take a look at this article I wrote to get you started:

Getting-Started-with-User-Macros-Writing-a-Wrapper-Macro 

Like Tony Montana likes this
Tony Montana
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

@Bill Bailey Yeah , Apparently, becoming a developer is the only way to solve my problems :) Thanks for trying to help

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events