Forums

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

Use a page property in a User Macro

Keith Wallace September 11, 2018

I am trying to use a page property in a User Macro.

## Macro title: getpageproperty
## Macro has a body: N
##
## Developed by: Keith Wallace
## Date created: 10/08/2018
## Installed by: Keith Wallace

## @Param MetaData:title=MetaData|type=string|desc=Page Property
## @Param CSPage:title=Page|type=confluence-content|desc=Customer Success Confluence Page

#set ($metaData = $action.getHelper().renderConfluenceMacro("{get-metadata:name=$paramMetaData}"))
#set ($url = "$paramCSPage?run_1_AccountNumber=$metaData&run_1=run")

<ac:structured-macro ac:macro-id="acd79225-4dc5-4d6d-80c6-9a514d17e176" ac:name="ui-button" ac:schema-version="1">
<ac:parameter ac:name="color">blue</ac:parameter>
<ac:parameter ac:name="title">Get Customer Success Health Dasboard $metaData</ac:parameter>
<ac:parameter ac:name="url">$url</ac:parameter>
</ac:structured-macro>

 

I get the page property in $metaData and can also print it. When I am setting $url, I am always end up with

<correct path>?run_1_AccountNumber=

missing the content of variable $metaData and the rest of the string.

Any idea why?

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events