Page 1 of 1

I need local variables (specific to a topic)

Posted: Fri Jan 03, 2014 2:17 pm
by stealth94rt
I'm working on a command reference that contains 3 topics with nearly identical text. There are only a few words in each that differ based on the particular topic. It would be ideal if I could declare a few local variables at the top of each topic and then use snippets for all the common text -- the snippets would contain the variable names and get the local values from each topic to handle the word differences. Unfortunately, it looks like Flare does not provide a way to create topic-level variables. If I did it with JavaScript or similar, it would likely only work with web outputs and I also need PDF.

Does anyone have suggestions or workarounds for something like this?

Re: I need local variables (specific to a topic)

Posted: Fri Jan 03, 2014 4:04 pm
by LTinker68
I think you can do what you want with snippet conditions. I haven't had a need to use them myself, but from what I've read on the forums, I think they'll do what you want.

Re: I need local variables (specific to a topic)

Posted: Thu Jan 09, 2014 6:42 pm
by dmcleod
Yeah, snippet conditions will work here. You'd create one snippet with all of your text in it. Then you'd condition the topic specific text for each one inside this snippet, and make your three different topics with this same snippet in it, with the snippet conditions applied to each topic.