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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

User macro parameter limitation?

Is there a limitation on amount of paramenter used in a user macro? Currently I have about 70 parameters in a confluence user macro. When I put the macro on the page, it allows me to fill in 37 of the 70 parameters. When putting in 38 parameters, and then saving, it gives me the spinning wheel.

1 answer

0 votes

There's no coded limit in Confluence, but it is checking over your parameters and how they are applied so my guess is that your macro is actually going into a loop.

I am curious as to why you've got a macro with so many parameters, but I don't think the number of them is the problem, it's going to be what the macro does with them all.

I do have a loop in there to repeat 10 instances of a group and stop but it's for a purpose to add specific code. Here is my code

 

## @Param RowHeader:title=Row Header|type=string

## @Param CardTitle1:title=Card Title 1|type=string
## @Param CardText1:title=Card Text 1|type=string
## @Param ButtonPage1:title=Button Link 1|type=confluence-content|desc=Type a Confluence page title
## @Param ButtonText1:title=Button Text 1|type=string
## @Param CardImage1:title=Card Image 1|type=string
## @Param ImageAltText1:title=Image Alt Text 1|type=string|desc=Add an image description

## @Param CardTitle2:title=Card Title 2|type=string
## @Param CardText2:title=Card Text 2|type=string
## @Param ButtonPage2:title=Button Link 2|type=confluence-content|desc=Type a Confluence page title
## @Param ButtonText2:title=Button Text 2|type=string
## @Param CardImage2:title=Card Image 2|type=string
## @Param ImageAltText2:title=Image Alt Text 2|type=string|desc=Add an image description

## @Param CardTitle3:title=Card Title 3|type=string
## @Param CardText3:title=Card Text 3|type=string
## @Param ButtonPage3:title=Button Link 3|type=confluence-content|desc=Type a Confluence page title
## @Param ButtonText3:title=Button Text 3|type=string
## @Param CardImage3:title=Card Image 3|type=string
## @Param ImageAltText3:title=Image Alt Text 3|type=string|desc=Add an image description

## @Param CardTitle4:title=Card Title 4|type=string
## @Param CardText4:title=Card Text 4|type=string
## @Param ButtonPage4:title=Button Link 4|type=confluence-content|desc=Type a Confluence page title
## @Param ButtonText4:title=Button Text 4|type=string
## @Param CardImage4:title=Card Image 4|type=string
## @Param ImageAltText4:title=Image Alt Text 4|type=string|desc=Add an image description

## @Param CardTitle5:title=Card Title 5|type=string
## @Param CardText5:title=Card Text 5|type=string
## @Param ButtonPage5:title=Button Link 5|type=confluence-content|desc=Type a Confluence page title
## @Param ButtonText5:title=Button Text 5|type=string
## @Param CardImage5:title=Card Image 5|type=string
## @Param ImageAltText5:title=Image Alt Text 5|type=string|desc=Add an image description

## @Param CardTitle6:title=Card Title 6|type=string
## @Param CardText6:title=Card Text 6|type=string
## @Param ButtonPage6:title=Button Link 6|type=confluence-content|desc=Type a Confluence page title
## @Param ButtonText6:title=Button Text 6|type=string
## @Param CardImage6:title=Card Image 6|type=string
## @Param ImageAltText6:title=Image Alt Text 6|type=string|desc=Add an image description

## @Param CardTitle7:title=Card Title 7|type=string
## @Param CardText7:title=Card Text 7|type=string
## @Param ButtonPage7:title=Button Link 7|type=confluence-content|desc=Type a Confluence page title
## @Param ButtonText7:title=Button Text 7|type=string
## @Param CardImage7:title=Card Image 7|type=string
## @Param ImageAltText7:title=Image Alt Text 7|type=string|desc=Add an image description

## @Param CardTitle8:title=Card Title 8|type=string
## @Param CardText8:title=Card Text 8|type=string
## @Param ButtonPage8:title=Button Link 8|type=confluence-content|desc=Type a Confluence page title
## @Param ButtonText8:title=Button Text 8|type=string
## @Param CardImage8:title=Card Image 8|type=string
## @Param ImageAltText8:title=Image Alt Text 8|type=string|desc=Add an image description

## @Param CardTitle9:title=Card Title 9|type=string
## @Param CardText9:title=Card Text 9|type=string
## @Param ButtonPage9:title=Button Link 9|type=confluence-content|desc=Type a Confluence page title
## @Param ButtonText9:title=Button Text 9|type=string
## @Param CardImage9:title=Card Image 9|type=string
## @Param ImageAltText9:title=Image Alt Text 9|type=string|desc=Add an image description

## @Param CardTitle10:title=Card Title 10|type=string
## @Param CardText10:title=Card Text 10|type=string
## @Param ButtonPage10:title=Button Link 10|type=confluence-content|desc=Type a Confluence page title
## @Param ButtonText10:title=Button Text 10|type=string
## @Param CardImage10:title=Card Image 10|type=string
## @Param ImageAltText10:title=Image Alt Text 10|type=string|desc=Add an image description


#macro(card $paramCardImage $paramImageAltText $paramCardTitle $paramCardText $paramButtonPage $paramButtonText)
<li class="o-auto-grid__item c-card">
<div class="c-card__content o-media-flex">
#if($paramCardImage)
<div class="o-media-flex__media">
<img class="u-border-radius-circle" src="$paramCardImage" alt="$paramImageAltText" />
</div>
#end
<div class="o-media-flex__content">
#if($paramCardTitle)<h2 class="c-card__title">$paramCardTitle</h2>#end
#if($paramCardText)<p class="c-card__copy">$paramCardText</p>#end

#if($paramButtonPage && $paramButtonText)
#if ( $paramButtonPage.indexOf(":") != -1 )
#foreach ( $part in $paramButtonPage.split(":") )
#set ( $space.key = $part )
#break
#end
#foreach ( $part in $paramButtonPage.split(":") )
#set ( $paramButtonPage = $part )
#end
#end
#set ( $linkSpace = $spaceManager.getSpace($space.key) )
<p class="c-card__copy"><span class="c-button">
<ac:link>
<ri:page ri:content-title="$paramButtonPage" ri:space-key="$space.key" />
<ac:plain-text-link-body>
<![CDATA[$paramButtonText]]>
</ac:plain-text-link-body>
</ac:link>
</span></p>
#end

</div>
</div>
</li>
#end

<div class="t-row__wrap">
<section class="t-row">
#if($paramRowHeader)<h2 class="t-row__intro c-row-header">$paramRowHeader</h2>#end
<ul class="t-row__content o-card-deck o-auto-grid">

#card($paramCardImage1 $paramImageAltText1 $paramCardTitle1 $paramCardText1 $paramButtonPage1 $paramButtonText1)
#if($paramCardImage2 || $paramImageAltText2 || $paramCardTitle2 || $paramCardText2 || $paramButtonPage2 || $paramButtonText2)
#card($paramCardImage2 $paramImageAltText2 $paramCardTitle2 $paramCardText2 $paramButtonPage2 $paramButtonText2)
#end
#if($paramCardImage3 || $paramImageAltText3 || $paramCardTitle3 || $paramCardText3 || $paramButtonPage3 || $paramButtonText3)
#card($paramCardImage3 $paramImageAltText3 $paramCardTitle3 $paramCardText3 $paramButtonPage3 $paramButtonText3)
#end
#if($paramCardImage4 || $paramImageAltText4 || $paramCardTitle4 || $paramCardText4 || $paramButtonPage4 || $paramButtonText4)
#card($paramCardImage4 $paramImageAltText4 $paramCardTitle4 $paramCardText4 $paramButtonPage4 $paramButtonText4)
#end
#if($paramCardImage5 || $paramImageAltText5 || $paramCardTitle5 || $paramCardText5 || $paramButtonPage5 || $paramButtonText5)
#card($paramCardImage5 $paramImageAltText5 $paramCardTitle5 $paramCardText5 $paramButtonPage5 $paramButtonText5)
#end
#if($paramCardImage6 || $paramImageAltText6 || $paramCardTitle6 || $paramCardText6 || $paramButtonPage6 || $paramButtonText6)
#card($paramCardImage6 $paramImageAltText6 $paramCardTitle6 $paramCardText6 $paramButtonPage6 $paramButtonText6)
#end
#if($paramCardImage7 || $paramImageAltText7 || $paramCardTitle7 || $paramCardText7 || $paramButtonPage7 || $paramButtonText7)
#card($paramCardImage7 $paramImageAltText7 $paramCardTitle7 $paramCardText7 $paramButtonPage7 $paramButtonText7)
#end
#if($paramCardImage8 || $paramImageAltText8 || $paramCardTitle8 || $paramCardText8 || $paramButtonPage8 || $paramButtonText8)
#card($paramCardImage8 $paramImageAltText8 $paramCardTitle8 $paramCardText8 $paramButtonPage8 $paramButtonText8)
#end
#if($paramCardImage9 || $paramImageAltText9 || $paramCardTitle9 || $paramCardText9 || $paramButtonPage9 || $paramButtonText9)
#card($paramCardImage9 $paramImageAltText9 $paramCardTitle9 $paramCardText9 $paramButtonPage9 $paramButtonText9)
#end
#if($paramCardImage10 || $paramImageAltText10 || $paramCardTitle10 || $paramCardText10 || $paramButtonPage10 || $paramButtonText10)
#card($paramCardImage10 $paramImageAltText10 $paramCardTitle10 $paramCardText10 $paramButtonPage10 $paramButtonText10)
#end

</ul>
</section>
</div>

Suggest an answer

Log in or Sign up to
This widget could not be displayed.
TAGS
Community showcase
Published in Confluence

Confluence Mythbusters: Does Atlassian even use Confluence?

Hi, Confluence collaborators! As part of #Confluence-Collaboratory month, we’ve created a very special Mythsbusters segment, where we're dive into an interesting myth and uncover the truth behind i...

307 views 4 14
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you