Copy link to clipboard
Copied
Hi,
I've done some testing and read a few threads in this forum, but cannot find a solution. Let's assume I have three books. All books have just a single file, called Content.fm. I have inherited an environments with tons of (unstructured) FrameMaker projects like this. The Content.fm has many conditions. For each book, there is - of course - a specific selection of conditions.
Whenever I want to publish a book for customer 2, I have to look up the conditions to activate in a separate text file. This is very error prone, because I have to deactivate and activate the conditions again and again. As conditions cannot be stored in hierarchies, it's a nightmare to maintain this.
I'd like to store the conditions in the book file. The goal should be, that the content of the Content.fm is dynamically filtered depending on the conditional settings in the book. In DITA this would be no problem, for example by filtering specific content branches with a <ditavalref>.
But, how can I inherit conditions down from books to documents? Do I really have to manually ticking all these conditional check boxes? I cannot believe this is true.
Copy link to clipboard
Copied
Hi Stefan,
Possibly I do not understand your issue.
What you can do:
Best regards
Winfried
Copy link to clipboard
Copied
"Whenever I want to publish a book for customer 2, I have to look up the conditions to activate in a separate text file."
I understand that this text file is just "documenting" the conditional tag combinations for each customer so that you can manually show/hide them for each customer book? That indeed sounds cumbersome and prone to errors.
I guess these documents were created in some quite old FrameMaker version, or your predecessor was not aware of "Conditional Expressions." Conditional Expressions provide exactly the functionality you are looking for.
Given a set of conditional tag (e.g., Feature1, Feature2, Feature3), you can definie Conditional Expressions like Customer1, Customer2, Customer3.
Then you can "assign" the conditional tags to the expressions, e.g.:
Customer1: "Feature-1"AND"Feature-2"
Customer2: "Feature-1"AND"Feature-3"
Customer3: "Feature-2"AND"Feature-3"
You can build all kinds of expressions with AND, OR, NOT, and build groups ()
Steps:
I would create a new empty document as a conditional expression template for future use, define all condition tags once through (or import them from existing documents as described by Winfried), and then import it into all the Content.fm documents.
So, simply said, you just need to "translate" the conditional tag settings documented in the text file into conditional expressions in the new conditional expression template. It's a one time-effort. From then on, you can simply open your content.fm documents, select the customer name from the Expression drop down in the Show/Hide Conditional Tags panel, save, publish.
Copy link to clipboard
Copied
Both Winfried and Stefan have provided excellent suggestions. One other approach I might suggest: This may be easier done with an ExtendScript script. You could have a small "control" file in the book's folder that gives the Show/Hide settings for that book. You would run a script that would read the control file and set the conditions for that particular book. This would save you from the manual steps of setting up Conditional Expressions, importing formats, etc. Full disclosure: I make a living developing automation solutions like this. If you are interested in exploring this further, please contact me offlist. Thank you very much. rick at frameexpert dot com
Copy link to clipboard
Copied
Thank you all for these excellent, very fast and very valuable solutions. I was not aware of this expression function. It is indeed very powerful. It is a good idea to store this in the templates. Ricks solution also sounds interesting, as we have FrameScript available. I'll discuss this internally.
Thank you all so much!
Copy link to clipboard
Copied
While I can gladly support FrameScript, be aware that ExtendScript is now built into FrameMaker 10 and higher.