Skip to main content
QuintinSeegers
Legend
April 8, 2024
Answered

Multiple Conditional Tags (FM2023)

  • April 8, 2024
  • 2 replies
  • 1877 views

We have a Conditional Tag (AU) for content that is specific to Australia and a Conditional Tag (NZ) for content specific to New Zealand. We also have documents with generic content that apply to both. However, there may be subtle differences (e.g. terminology) that is specific to Australia or New Zealand. Instead of maintaining different versions, we assign the respective Conditional Tag to the Australian/New Zealand-specific content.

 

It sometimes happens that this common content may have additional text that is applicable only if the content is used in relation to a specific product. For those, we have another Conditional Tag (e.g. PPLQG_CASHOUT) that is applied to said content.

 

We have a scenario where within the same document, we have content with all three Conditional Tags (AU, NZ, PPLQG_CASHOUT) applied to various content, e.g.

  • Paragraph A: Conditional Tag AU (only shown for AU)
  • Paragraph B: Conditional Tag NZ (only shown for NZ)
  • Paragraph C: Conditional Tags NZ & PPLQG_CASHOUT (only shown for NZ and for product PPLQG_CASHOUT)

Showing Conditional Tag AU works as expected. Only Paragraph A is shown.

 

Where we have difficulty is with Paragraph B and Paragraph C.  Paragraph B should show when Conditional Tag NZ is shown. (Working as expected). However, Paragraph C is also showing, even though Conditional Tag PPLQG_CASHOUT is hidden. 

 

We tried using the Expresssion, but couldn't get that to work correctly. Put simply, we want to be able to say:

  • If Conditional Tag AU is shown, show Paragraph A only
  • If Conditional Tag NZ Is shown, show Paragraph B only
  • If Conditional Tag NZ and PPLQG_CASHOUT is shown, Show Paragraph B and Paragaph C.

 

Any suggestions on how to achieve this?

 

Added: The only way we've managed to achieve this is by having a conditional tag PPLQG_CASHOUT_NZ applied to Paragraph C only, resulting in the following scenario:

  • Paragraph A: Conditional Tag AU (only shown for AU)
  • Paragraph B: Conditional Tag NZ (only shown for NZ)
  • Paragraph C: Conditional Tags PPLQG_CASHOUT_NZ (only shown for PPLQG_CASHOUT_NZ)

Have someone found a better way to manage this?

    This topic has been closed for replies.
    Correct answer QuintinSeegers

    You would have to have the appropriate attributes set in elements in the EDD. For example, you may have a "product" attribute on certain elements. You can see in my example, that the client has "equipment-type", "model-sizes", and "product" attributes on some of their elements and they use these to show/hide certain elements.

     

    Condition Tags, as you know, don't require any special modifications to your structure. However, they only show as processing-instructions in any XML that you export. If you needed to preserve filtering instructions in your XML, it would be better to have them as attributes.


    quote

    You would have to have the appropriate attributes set in elements in the EDD. For example, you may have a "product" attribute on certain elements. You can see in my example, that the client has "equipment-type", "model-sizes", and "product" attributes on some of their elements and they use these to show/hide certain elements.

     

    And that would be the reason why we stayed with using Conditional Tags. As I mentioned previously, these Conditional Tags can apply to any content, so it would require us to add every Conditional Tag as an Attribute to every Element in our EDD. Also, multiple Conditional Tags could be applied to the same content. For example, we have some content that are shown in several product manuals and not in others. Using "Product Manual" as an Attribute, for example, we wouldn't be able to select multiple options against the same Attribute.

     

    (Edited: I should stop clicking the Post button before I finished typing my reply 🤦)


    @frameexpert wrote:

    Condition Tags, as you know, don't require any special modifications to your structure. However, they only show as processing-instructions in any XML that you export. If you needed to preserve filtering instructions in your XML, it would be better to have them as attributes.


     

    Fortunately we don't use XML, so that's not an issue for us.

    2 replies

    Matt-Tech Comm Tools
    Community Expert
    Community Expert
    April 9, 2024

    Are you still working with structure?

    Tags are best saved for unstructured content.

    -Matt Sullivan, FrameMaker Course Creator, Author, Trainer, Consultant
    QuintinSeegers
    Legend
    April 9, 2024

    Hi Matt,

     

    Yes, we've completely moved away from unstructured, so we only use structured now. 

    quote

    Are you still working with structure?

    Tags are best saved for unstructured content.

     

    How would we manage this in a Structured document otherwise, if not using Conditional Tags?

    Matt-Tech Comm Tools
    Community Expert
    Community Expert
    April 9, 2024

    Attributes

    -Matt Sullivan, FrameMaker Course Creator, Author, Trainer, Consultant
    frameexpert
    Community Expert
    Community Expert
    April 8, 2024

    I staged this and just added an NZ-only Expression:

     

    QuintinSeegers
    Legend
    April 8, 2024

    @frameexpert That would resolve it to show only Paragraph B (from my example), but how would we achieve the scenario where Paragraph B and Paragraph C needs to show?

    frameexpert
    Community Expert
    Community Expert
    April 8, 2024