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

What is the point of Blueprint Variables?

Jason Pohl Oct 20, 2013

Confluence 5.1

What is the point of Blueprint Variables? I can't seem to reference them, and there is not much documentation.

Here is what I'm trying to do:
1) Created a Blueprint and created a variable in the document properties called $featureLabel

2) Within this template, I have inserted a Page Properties Report macro

3) Within this macro, I would like to specify my variable, $featureLabel, as the Label parameter.

However, when I view the page, I get the error:

"The specified label $featureLabel does not exist."

I've tried representing the variable as {featureLabel} and @featureLabel@, but no joy.

I'm guessing that I am not referencing the variable in the correct manner, but how do I do this?

If I can not do such a simple substitution, then what is the point of these variables?

1 answer

0 votes
Tadd Seiff Apr 08, 2016

See the intermediate Blueprint tutorial.  Regarding your technique using the properties file, they use this properties file there and you can see that it only sets DOM-like elements to be used while the blueprint is being used and also some system-required values like the name of the plugin, etc.  They can be referenced by your soy/html templates for the Blueprint wizard.

I don't think these are meant to persist after the page is created, I think they are static.  

I wouldn't call what you are doing as "variables", I'd call that "setting properties" for the plugin. I think you would want to use regular Template variables for what you want.  Since these would be legit Template variables, they would probably register with your page properties MACRO.

So in summary, the Blueprint is just a stepping stone for creating the page, it's not going to get you persistent page properties.  Why are you using a Blueprint?  If you only need these variables, I think a Template would be what you need, unless you have other creation tasks.

(tl;dr; begin) FWIW:

I have a different understand of what a "Blueprint Variable" is.

I'm using variables in Blueprints with this <at:> syntax business in the template:

&lt;tr&gt;&lt;th colspan="1"&gt;ReqID&lt;/th&gt;
&lt;td colspan="1" &gt;
&lt;at:var at:name="reqID" /&gt;

These are entered client side in the wizard and bound by element name, i.e.:

&lt;input id="reqID" class="text" type="text" name="reqID"&gt;

Then I'm grabbing these server side in JAVA in a ContextProvider instance, where I can do back-end stuff using those values and pre-fill some other fields before the page is finally approved by the user.

All of this is transient though in that once the page is created, this all goes "out of scope".

NOTE: One thing I haven't figured out is how to get these type of "variables" to populate corresponding TEMPLATE variables.


Suggest an answer

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

6 Awesome Ways to Apply Trello, JIRA and Confluence to your Project

I attended  Atlassian Summit 2019  and learned a lot from the presenters, attendees and knowledgeable Atlassian product managers. The presentations I attended focused on applying Agile, pla...

950 views 7 17
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