variables in the text
Asked by David Darbinyan:

hi support

Is there a way to define a variable in the begining of the document (something like $MeetingHour ) and then use it in several places inside the document or its subdocuments.

thnaks


Answers:
author: EPS Software Engineering AG
body: Hi David,

Maybe the Easy Space Variables (ESV) app will meet your requirements. You can find the app on the marketplace.  

Regards,  
Stephan (CEO of EPS Software Engineering AG, the vendor of the ESV app)

comments: author: David Darbinyan
body: I cannot test it because trial version doesnt allow even to save newly created variable.

Besides, it is in fact space-wide variable, not document specific

Besides, need admin right to create one??

Beside, it allows simple text. not any formated one

BR  
D.


author: EPS Software Engineering AG
body: Hi David,

This is really not good. May I ask you to open a ticket on our service desk so that we can investigate the causes.

It's: <https://issue.eps.ch/servicedesk/customer/portal/10>

Thank you very much and regards,  
Stephan


author: Sam Liddicott
body: Stephan - does ESV permit variables to be defined at the top of the page, and expanded out in any content, including multi-except content from other pages?

I have some simple-task pages which contain simple steps, which should use variables defined in those pages.

The core steps are marked to be used as excerpts in other pages.

The other larger pages would define the same variable names with different values and take excerpts from a variety of pages; to make specific instructions.

The larger pages would have the same core contents as the smaller pages, but show different variable values in the steps.

Is this something that ESV can do?

(Note, these are page variables, not space variables). (Implementation as page properties would be fine)


author: Robert Reiner _smartics_
body: An alternative solution could be the [projectdoc Toolbox](https://www.smartics.eu/confluence/x/1YEp) (commercial add-on [available on the Atlassian Marketplace](https://marketplace.atlassian.com/1212629)).

It also provides tools to define space variables (we call them [space properties](https://www.smartics.eu/confluence/x/jwNk)) that can be referenced from all pages within the Confluence site.

There is also the option to define variables on a page (we call them [document properties](https://www.smartics.eu/confluence/x/54XSAw)). The property values can be accessed by specifying the page and the name of the property -- either directly by the use of the [Display Document Property Macro](https://www.smartics.eu/confluence/x/sANk) or tabular with [Tour Macro](https://www.smartics.eu/confluence/x/pwFr); or as a result of a query using the [Display Table Macro](https://www.smartics.eu/confluence/x/wgNk). You can even define a template with the [Display Document Properties Macro](https://www.smartics.eu/confluence/x/sgNk) to fetch multiple values (for instance the authors and publication date of a referenced article).

Regarding access to document properties from child pages: If you define a property in a parent page, the child pages can reference the parent page by the use of the [Parent Property Macro](https://www.smartics.eu/confluence/x/zwNk). The [Display Document Property Ref Macro](https://www.smartics.eu/confluence/x/tgNk) can then be used to access the referenced document (the parent page in this example) and read the value of a property of the referenced document. This feature is useful if the properties should change once the child page has been moved to a new parent page. Otherwise the <Display Document Property Macro> allows to specify a link to a page by its title.

**Biased alert:** Please note that I am an author of the projectdoc Toolbox. So my answer is surely biased. :)

The projectdoc Toolbox is available for Confluence server. More information on our add-on is available in the [Online Manual](https://www.smartics.eu/confluence/x/EAFk). There are also a lot of examples for blueprints (we call [doctypes](https://www.smartics.eu/confluence/x/GwFk)) [available for free on the Atlassian Marketplace](https://marketplace.atlassian.com/search?query=smartics%20blueprints) (also [published as open source projects on Bitbucket](https://bitbucket.org/account/user/smartics/projects/PDACA)).