Use variable as a definition for another variable

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
kerimucci
Propeller Head
Posts: 59
Joined: Thu Nov 02, 2017 3:38 am

Use variable as a definition for another variable

Post by kerimucci »

I have a product version variable for each of the products that I write about, and I also have a general title version variable that is used on my PDF cover pages. The general title version variable exists because I have one topic for my cover page that is used across multiple targets, changing based on the related product version. I thought this was wiser than duplicating my cover page.

This means when we have a release, I need to update the product version variable, as well as the title version variable for each target I need to publish.

Is there a way to set up the title version variable definition so that it is automatically replaced with the definition for that of the associated product version variable? This would mean I'd only need to change the product version variable with each release.
doloremipsum
Sr. Propeller Head
Posts: 290
Joined: Mon Aug 26, 2019 2:11 pm

Re: Use variable as a definition for another variable

Post by doloremipsum »

Good news, it absolutely is possible! You can set the definition for your title variable as something like this:

Code: Select all

ProductA Version [%=Variables.VersionNumber%]
And it will automatically insert the correct version number during the build.
in hoc foro dolorem ipsum amamus, consectimur, adipisci volumus.
kerimucci
Propeller Head
Posts: 59
Joined: Thu Nov 02, 2017 3:38 am

Re: Use variable as a definition for another variable

Post by kerimucci »

Thank you so much! Worked like a charm.
Post Reply