Newbie question - Conditional text

This forum is for all Flare issues not related to any of the other categories.
Post Reply
MK Paul
Jr. Propeller Head
Posts: 2
Joined: Mon Mar 22, 2021 6:21 am

Newbie question - Conditional text

Post by MK Paul »

Hi, my first post - please be kind ! :-)

We write the help for a modular piece of software and produce separate HTML5 help for each module. All of these are maintained in one large Flare project, with a separate project for global content (stylesheets, conditions etc).
We also produce, for internal use only, a complete HTML5 help that contains everything. We create that by including all the separate TOC files in one complete TOC as follows:

CompleteHelp Target TOC
TOC_Module1
TOC_Module2
TOC_Module3
TOC_Module4

We now have two slightly different versions of one of our modules, for different finance sectors. We’re using conditions to can mark the sector-specific information, and two targets that exclude the unwanted condition in each case. These targets use the same TOC as almost all the topics are in both versions.
For the customer-facing help that works fine, we just build each target separately.

However for the complete internal HTML Help we’ve been asked to include both versions in their entirety, so that internally we can all versions of the help, even though that means that a lot of topics will appear twice. So we need to have:

CompleteHelp Target TOC
TOC_Module1
TOC_Module2a (includes 2a content, excludes 2b)
TOC_Module2b (includes 2b content, excludes 2a)
TOC_Module3
TOC_Module4

We need to correctly include/exclude the 2a and 2b content differently to two TOCs within the same target, so what we really want is to be able to associate conditions to those two TOCs (include/exclude) rather than just apply them. This doesn’t seme to be possible.

Is there another way we can do this?
NorthEast
Master Propellus Maximus
Posts: 6363
Joined: Mon Mar 05, 2007 8:33 am

Re: Newbie question - Conditional text

Post by NorthEast »

You can't set conditions at the TOC level that will control content in your topics, but you could use snippet conditions.

For each topic with duplicated content, you could put all the topic's content inside a snippet; e.g. Topic2.flsnp.
Then make a copy of the topic for each different sector; e.g. Topic2_A.htm, Topic2_B.htm.
In each copy of the topic, set the snippet conditions for the inserted snippet (Topic2.flsnp), so it displays appropriate content for that sector.
In your TOC for sector A, include Topic2_A.htm; then do the same for B.
Then you can build internal help that contains Topic2_A.htm and Topic2_B.htm, so you get a separate topic for each sector.

Or alternatively, if you wanted a single topic Topic2.htm containing both variants, you would just have one topic that contains two separate instances of the snippet. Each snippet instance would have snippet conditions as mentioned above, and each would also need a regular condition on the snippet so that it's excluded from the appropriate customer-facing target.
Post Reply