How can I use variables to define Space properties such as Organisation Name, Product Name, Version?

Change is always constant and we must adapt to it. Considering that few parameters in our documents change often, I want to define a kind of configurations (name = Value pair) for my space, so that I can change them when required.

For example, if I want the Product name to be a variable, I want to declare the current name and reuse it across the space referring to one location. And when the name changes, I can only modify the Product name in one location and the rest of the document picks it up.

I searched the Community for similar scenarios but did not find an effective solution.

Any help is appreciated.

2 answers

1 accepted

0 votes
Accepted answer

If you don't need a complex solution, a very basic method would be to create a user macro for your property, and include that macro on all the pages associated with that property. If you update the macro, every page it appears on will be updated. This will require admin priviledges to create and administer these.

## Macro name: propertyversona
## Macro Title: Property Version A
## Macro Body Processing: No macro body
## Visibility: Visible only to system administrators (if you don't want users to see/insert these macros)
## @noparams
## Previous Versions
## 1.0, 1.1


The above should print out the version (1.2) where ever you include the macro {Property Version A} on a page. Text may wrap around it, I'm not sure (I don't currently have admin access to test.)

The projectdoc Toolbox provides Space Properties to do this.

On the homepage these properties can be defined and used by the Display Space Property Macro. There are also macros that allow placeholder resolvement (for instance in the Transclusion Macro). There are different options to specify these properties (for instance you may attach a properties file to a page).

Using Space Properties provides a tip on how to use this feature.

Using Confluence macros you may use the Excerpt Macro, but this would need to have each property specified on a separate page.

The projectdoc Toolbox is a commerical add-on for Confluence server, available on the Atlassian Marketplace. I'm one of the authors, so my answer may be biased ... :)

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,464 views 114 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