Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×Hi,
i am writing a space blueprint with the help of the "Write a simple Confluence Space blueprint" tutorial. I now need to write a template which contains the tasks-report-macro but i have a problem with getting the space-key as a parameter inside the macro.
Using <at:var at:name="key"/> doesn't work. When i look at the storage format of the created template the spaces-parameter looks like this: <ac:parameter ac:name="spaces" />
My (not working) code looks like this:
<ac:structured-macro ac:name="tasks-report-macro">
<ac:parameter ac:name="spaces"><at:var at:name="key"/></ac:parameter>
<ac:parameter ac:name="pageSize">10</ac:parameter>
<ac:parameter ac:name="labels">product-requirements</ac:parameter>
</ac:structured-macro>
Thanks for you help! :)
for anyone still looking for an answer to this (I know I did):
the space-key variable is named "spaceKey", not "key"
<at:var at:name="spaceKey"/>
I am also looking for an answer to this question!
Would be great if this was solved and documented somewhere. Unfortunately, the documentation for space blueprints is really lacking...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I can only offer a hack as a workaround:
Add the XML element to the blueprint context and render it.
The following code snippet is from an implementation based on the com.atlassian.confluence.plugins.createcontent.api.contextproviders.AbstractBlueprintContextProvider. The context points to an object of type com.atlassian.confluence.plugins.createcontent.api.contextproviders.BlueprintContext. The spaceKey is simply the string with the key.
context.put("spaceKeyElement",
"<ri:space ri:space-key=\"" + spaceKey + "\" />");
The add this to the XML blueprint:
<ac:parameter ac:name="spaceKey"><at:var at:name="spaceKeyElement" at:rawxhtml="true"/></ac:parameter>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have the same question. Did you find something ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.