Relationship of Conditional Text and Variables

This forum is for Single-Sourcing your Flare content to multiple outputs.

Relationship of Conditional Text and Variables

Postby Joseph Zitt on Tue Aug 27, 2019 8:47 am

This might be the most basic of questions, but I'm not getting it.

We have a wide array of products. I'm trying to keep them in a single project so I can reuse stylesheets, snippets, and the like among them.

We have products named "Audit" and "Firewall". You start each with with a different command. For Audit, it's "STRAUD". For Firewall it's "STRFW". THese appear frequently in the documentation for each in what I hope will be reusable content, since there are parts of each program that are the same except for the starting command.

I had created a variable set for each, and a variable named "Command" within them, with the appropriate command for each as its Definition. For the Targets for each, I had set the Conditional Text for each to Include that one and Exclude the other.

I had put the command for each as variables, which I would think would change when the snippets containing them would be included in the files for each product. But no matter which product I'm documenting, it gets included as, for example, in the Text Editor view,

Code: Select all
enter the <span class="Command"><MadCap:variable name="Audit.Command" /></span> command on the command line

and where it has "Audit.Command" it shows "STRAUD". Within files for the Firewall target, I would expect this to turn into something like "Firewall.Command" rather than "Audit.Command" and show "STRFW" rather than "STRAUD". But no matter what I do, it stays with "Audit.Command" and "STRAUD".

So (as Thomas Jefferson would sing) what did I miss?
Joseph Zitt
Propeller Head
 
Posts: 27
Joined: Sun Mar 10, 2019 3:36 am

Re: Relationship of Conditional Text and Variables

Postby devjoe on Tue Aug 27, 2019 1:26 pm

It sounds like you don't understand the workflow for using variables with different definitions in different targets.

  1. You create one variable set.
  2. Define each variable you need in it, with a default definition.
  3. In each Target, in the Variables tab, you redefine any variables that need to have definitions other than the default.
  4. In the topics, you insert the variable in each place you want target A to say one thing and target B to say the other. The default definition will be displayed in the XML editor in the shaded box, but the output will have the appropriate values.

In the text editor, where it shows
Code: Select all
MadCap:variable name="Audit.Command"

Audit is the name of the variable set, and command is the name of the variable within that set.
devjoe
Sr. Propeller Head
 
Posts: 308
Joined: Thu Jan 23, 2014 1:43 pm

Re: Relationship of Conditional Text and Variables

Postby Joseph Zitt on Wed Aug 28, 2019 12:28 am

devjoe wrote:It sounds like you don't understand the workflow for using variables with different definitions in different targets.


Wow, that is completely different than I had thought. This is what comes from diving into major projects without any Flare training other than watching videos.

I'm trying your workflow now. Thanks!
Joseph Zitt
Propeller Head
 
Posts: 27
Joined: Sun Mar 10, 2019 3:36 am


Return to Single-Sourcing

Who is online

Users browsing this forum: No registered users and 2 guests