Skip to main content
Inspiring
September 11, 2024
Question

Using snippets and conditonal tags to single source content within the same deliverable.

  • September 11, 2024
  • 4 replies
  • 1013 views

I'm having trouble figuring out how to use snippets the way I want to, and I haven't been able to locate any help on the matter. Here's what I'm trying to do:

 

Documenting two features that are 90% identical:

1. Create a snippet.

2. Create two condition tags, called FEATURE1 and FEATURE2.

3. Apply the condtional tags as required to the content of the snippet.

4. Place the snippet into topic called FEATURE1_TOPIC.

3. Place the snippet into another topic called FEATURE2_TOPIC.

 

I want only condition FEATURE1 to appear in topic FEATURE1_TOPIC, and only condition FEATURE2 to appear in FEATURE2_TOPIC. But I cannot figure out how to tell the snippet, "Only display FEATURE1 conditonal," or, "Only display FEATURE2 conditional."

 

Same problem with variables. If I were to attempt to use variables instead of conditions, I don't see how I could set the value of the variable at the snippet insert level.

 

In RoboHelp parlance, I believe what I'm wanting to do is to apply a "condition expression" to a snippet, and/or apply a "variable set" to a snippet.

 

    This topic has been closed for replies.

    4 replies

    Peter Grainge
    Community Expert
    Community Expert
    September 12, 2024

    The condition expression will apply to all topics but your setup requires different expressions for different topics. I can't readily see a way of doing that.

     

    By now you have probably spent more time than just creating two topics for the different models. 🙂 A setup with one topic giving a link to two others and the user chooses the required model.

     

    Tags and expressions are essentially to create different outputs or to work with DCF and I agree the latter is not really what you want.

    ________________________________________________________

    My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

     

    Use menu (bottom right) to mark as Best Answer or to Highlight particularly useful replies. Found the answer elsewhere? Share it here.
    Peter Grainge
    Community Expert
    Community Expert
    September 12, 2024

    I'm still missing the objective. Are you wanting two outputs for different audiences or one output that almost duplicates a topic but with some difference and in the same output?

     

    You can duplicate a preset and then make just the changes you need for a different audience. There is also a Dynamic Content Filtering feature that lets users apply whichever filter applies to them. Somehow that doesn't seem to be what you want though.

    ________________________________________________________

    My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

     

    Use menu (bottom right) to mark as Best Answer or to Highlight particularly useful replies. Found the answer elsewhere? Share it here.
    Peter Grainge
    Community Expert
    Community Expert
    September 12, 2024

    I'm not clear on what you are trying to achieve. Is this it?

     

    You need two outputs each with a topic that is 90% the same but certain parts vary. Correct? You only need one topic.

     

    The main part of the content needs no tagging. The rest needs to be completed with snippets where in one output Feature 1 snippet will display and in the other output Feature 2 will display. 

     

    Ignoring variables for now, then you put both Snippets in the topic and apply the appropriate tag. It's best to think of a NOT condition expressions so apply

    • The Feature 1 tag to the Feature 2 snippet.
    • The Feature 2 tag to the Feature 1 snippet

     

    Next create two expressions, NOT Feature 1 and NOT Feature 2.

     

    To generate the Feature 1 version you select the NOT Feature 2 expression. That way it will exclude the snippet with the Feature 2 tag and your output will contain the Feature 1 snippet. The other way around for the other output.

     

    The variables within the snippets should then sort themselves out.

     

    Try that and let us know.

    ________________________________________________________

    My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

     

    Use menu (bottom right) to mark as Best Answer or to Highlight particularly useful replies. Found the answer elsewhere? Share it here.
    Jeff_Coatsworth
    Community Expert
    Community Expert
    September 12, 2024

    I know I've done what I described - I have several snippets that have mixed content that is conditioned depending on what product is being used (I create separate help outputs for each product). Then I have separate topics (that I also condition by product) because the positioning in my TOC changes depending on which product is in play (e.g. in one product our CRM module stands alone; in the other it sits as a sub-module to our A/R module).

    Jeff_Coatsworth
    Community Expert
    Community Expert
    September 11, 2024

    Not quite sure why it's not working - your snippet has text that applies to each conditional tag; you place the snippets in their respective topics - then you apply the condition to the topic. In your preset you say which condition you want to see - that's what you should get.
    What are you seeing? maybe some screenshots would illustrate it better?