Question about links/conditions for multiple outputs

This forum is for Single-Sourcing your Flare content to multiple outputs.
Post Reply
cburnett
Jr. Propeller Head
Posts: 8
Joined: Wed Nov 29, 2017 9:09 am

Question about links/conditions for multiple outputs

Post by cburnett »

I have a question about a project with multiple build scenarios whose topics still need to link to each other when they aren't built together. Let me paint a picture of my situation: My company sells a software that is divided up into 18 sections (Cards, Loans, Deposits, Miscellaneous, etc). I want to create one massive Flare project that contains all help documentation for this software (with the Contents folder divided into 18 folders, one folder for the topics/images in each section of the software).

We build our help files in two primary ways: Microsoft HTML Help (.chm) and Web files. Ideally, I want to use one target for building the entire project as a .chm file, and I also want to use 18 other targets for building each section's Web files separately (for ease of access, and because building ALL of our Web files at once each time a change is made would take a prohibitively long time). I would mark each of the 18 Content folders with a unique condition, and I would set up the 18 targets to publish one condition each.

My question relates to linking between topics that aren't in the same condition. Example: If I have a text link in a topic in the Cards folder (green condition), which links to a topic in the Loans folder (orange condition), that link will function properly in the .chm build (because the .chm target builds ALL topics in the entire project), but the link won't work in the Web build (because the Cards target only publishes the green condition, and the Loans topic being linked is labeled orange).

I have figured out a workaround to this issue, but I was wondering if there is an easier method to make these links (and differing builds) work together other than what I've determined. Here's my solution:

-Create 2 new condition tags: CHMLinks (yellow) and WebLinks (blue).

-Whenever a topic in one Contents folder contains a text link to a topic in another folder, duplicate the text and tag each copy of the text with a different condition (one blue, one yellow). Change the hyperlink on the blue condition text to the actual URL where the desired topic will be located (when it is pushed to the Web).

-Set the .chm target to include all conditions except blue.

-Set each of the 18 other targets to include only their corresponding color and blue and exclude all others.

Thanks in advance for any advice.
devjoe
Sr. Propeller Head
Posts: 337
Joined: Thu Jan 23, 2014 1:43 pm

Re: Question about links/conditions for multiple outputs

Post by devjoe »

One way you might be able to improve on this is to use a variable.
Within the link destination, you can type [%=VariableSet.VariableName%] to include the content of a variable within the link.
So if your link for the CHM file goes to ../otherproject/filename.htm
And the link for the web version goes to ../../../../../blah/blah/otherproject/filename.htm
Then you can enter [%=VariableSet.VariableName%]/otherproject/filename.htm as the link destination
Within the targets, set the value of the variable to .. for the CHM file and ../../../../../blah/blah for the web targets.

Hopefully, the structure of how your projects are arranged is nice enough to allow you to use one variable like this. If necessary, though, you can create a separate variable for each destination project. This means a lot more setting of variables, though, and might not be better than what you are doing unless you really have a lot of these links.
Post Reply