Using a variable as default value for macro parameter?


I have a user macro where one of the required parameters is the 'page owner', i.e. the username of the person charged with keeping the page up to date. I want the default value for this parameter to be the username of the page creator. This I am trying to achieve by passing $ to the parameter:

## @param Owner:title=Owner|type=username|required=true|default=$

However, the string '$' is simply rendered as plain text in output. I have also tried to do it by setting a custom variable first, i.e.:

#set($ownerName = $
## @param Owner:title=Owner|type=username|required=true|default=$ownerName

But the result is the same. Can I pass a variable default value to the parameter somehow? It seems like this would be a trivial thing, so perhaps I am going about it the wrong way? Thanks in advance for any help!



2 answers

Hi, I'm currently facing the same problem. Did you found out by now how this can be achieved?



Hi, I'm afraid not. Have put my project on hold for now... :/

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

1,028 views 51 8
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you