Can I use variables across multiple Confluence pages?

I have a bunch of pages in a space that include references to things like client names. I want to be able to clone this space and have a means of updating the client name (amongst several other parameters) to some new value so that I can then commence working on documentation tailored to a specific client.

I can imagine a couple of ways of achieving this and this leaves my quite surprised that there is not a built-in feature or an obviously available plugin that will do what I want.

  • I could export a space and run a bunch of search/replace operations.
  • Nicer would be a configuration page for a space where I could set as many variables as I like and have these used when rendering page content within the space. These could be interpreted statically, i.e. when a page template is used, or dynamically, i.e. resolved at the time the page is rendered so that I can change them.

Is there a feature or plugin I am failing to see that can achieve this?


4 answers

1 accepted

Our (commercial) projectdoc Toolbox Add-on allows to define properties for a space. These space properties are accessible by the Display Space Property Macro that is also part of the add-on.

So if you define a space blueprint or create a new page with references to space properties using the Display Space Property Macro, the values for these properties will be resolved on request time on this page.

For instance, if you define a space property (with the Document Properties Marker Macro on the space home page) named "Customer" with a value of "Example Inc." then the Display Space Property Macro, referencing the "Customer" property, will render the value "Example Inc.". When you change the name for the customer, the macro will always render the current value.

For more information on dealing with space properties, please refer to Using Space Properties on our web site (which I'd recommend as an introduction to this topic smile).


The projectdoc Toolbox plugin does a whole bunch of things, one of which is that it allows space and page level properties to be defined and used subsequently in other documents. This is precisely what I am after.

Having run a trial of this plugin it looks like it meets my needs and in fact I have now purchased it. As part of my solution I am also making use of the Copt Page Tree and Copy Space plugins.

I asked a few questions of the developers and quickly received a comprehensive response that included details of how to apply the tool in a couple of corner cases, so I am certainly pleased with their support and impressed by comprehensive capabilities of the plugin.

The closest thing to this is the Excerpt or Multi-Excerpt plugin which reuses content on one page across pages.

But yes, a variable plugin would be great. How about it plugin developers?

Hi Adrian,

Christmas is quiet away, but here it is ;-)

The Easy Space Variables Add-on. Try it out and let us know, if it fits your needs.


Hi Scott,

With our add-on Space Tree Creator you can achieve the functionality you are looking for. The add-on does a search&replace during the creation process. The variables (tags) are marked by special characters (__) within normal Confluence pages. You don't need any programming skills.

Check out our live examples: link

Marketplace Link: Space Tree Creator


Thanks for your reply Stephan. Your plugin would appear to provide a nice way of applying variables at the time a tree of pages is created. This is an excellent solution, but in my case I am after the ability to modify the values even after the pages have been created.

0 votes

It's not as nice as variables, but you could do this with user macros - you can easily write one that could say client:address, and have a long list of clients in a "case" type statement.  Or, as I did for one place, have it based on the current space instead of a parameter (so you'd just say "client" and the macro would work it out from the space or other data somewhere)

The downside is that you'd need admin rights to edit the content, so it's not brilliantly flexible


Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

1,040 views 2 13
Read article

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