Highlighted

Storing conditions in books

Community Beginner ,
Nov 03, 2020

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.

 

fm-conditions.png

 

"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:

  1. Choose View > Show/Hide Conditional Tags
  2. In the Show/Hide Conditional Tags panel, click Build Expression to open the Manage Conditional Expression dialog.
  3. Type in an Expression Name (e.g., the customer name)
  4. Select the Condition Tags you want to include in the defition and combine them with AND/OR/NOT.
  5. Click Save.
  6. Back in the Show/Hide Conditional Tags panel, select "Show as per Expression" and select the Expression (e.g., "Customer2" for whom you want to publish.

 

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. 

Views

51

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Storing conditions in books

Community Beginner ,
Nov 03, 2020

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.

 

fm-conditions.png

 

"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:

  1. Choose View > Show/Hide Conditional Tags
  2. In the Show/Hide Conditional Tags panel, click Build Expression to open the Manage Conditional Expression dialog.
  3. Type in an Expression Name (e.g., the customer name)
  4. Select the Condition Tags you want to include in the defition and combine them with AND/OR/NOT.
  5. Click Save.
  6. Back in the Show/Hide Conditional Tags panel, select "Show as per Expression" and select the Expression (e.g., "Customer2" for whom you want to publish.

 

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. 

Views

52

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Nov 03, 2020 0
Adobe Community Professional ,
Nov 03, 2020

Copy link to clipboard

Copied

Hi Stefan,

 

Possibly I do not understand your issue.

What you can do:

  • Select all files in the book and then change the show/hide settings for all of them.
  • You can add some new files at the end of your book. Exclude them from printing. Just set in each of them the show/hide settings for a specific output variant. Then import the conditions of this file into all the other files (excluding these new settings files). Definitely easier than looking something up in a separate text file.
  • You can also store information on the reference pages of the very first file to look something up.
  • And you can do create an expression for your show/hide settings and save this under a unique name. Then import these settings into the other files. Then you just have to select all files and select the correct expression.

 

Best regards

 

Winfried

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 03, 2020 0
Adobe Employee ,
Nov 03, 2020

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:

  1. Choose View > Show/Hide Conditional Tags
  2. In the Show/Hide Conditional Tags panel, click Build Expression to open the Manage Conditional Expression dialog.
  3. Type in an Expression Name (e.g., the customer name)
  4. Select the Condition Tags you want to include in the defition and combine them with AND/OR/NOT.
  5. Click Save.
  6. Back in the Show/Hide Conditional Tags panel, select "Show as per Expression" and select the Expression (e.g., "Customer2" for whom you want to publish.

 

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. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 03, 2020 0
Adobe Community Professional ,
Nov 03, 2020

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 03, 2020 1
Community Beginner ,
Nov 03, 2020

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!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 03, 2020 0
Adobe Community Professional ,
Nov 03, 2020

Copy link to clipboard

Copied

While I can gladly support FrameScript, be aware that ExtendScript is now built into FrameMaker 10 and higher.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 03, 2020 0