Skip to main content
Inspiring
Jul 2, 2021 12:15 AM UTC
Question

How to reuse text that is almost identical

I am using RH 2020.5.71.

I have many situations where I want to use a snippet but there is just one word that needs to be different from one case to another. For example, let's say I have two topics and I want one to say "Four score and seven years ago" and the other to say "Four score and seven days ago". Is there are way to insert a variable into the snippet so it is "Four score and seven {UNITS} ago"? And then in topic #1 I set the variable value to be "years" and topic #2, set the variable value to be "days"? I know this is asking a lot, but thought I would check. My real snippet is much more complex, containing graphics and multiple occurances of {UNITS}.

    This topic is closed to new replies. Start a new post to keep the conversation going.

    5 replies

    Legend
    Jul 2, 2021 6:13 AM UTC

    If you do not have to change the text of the snippet after using it, you could for the time being try this: add the snippet to your topic, right click - Snippet - convert to text. Then you can enter the desired unit. 

    Translate
    JamesJimAuthor
    Inspiring
    Jul 2, 2021 9:00 PM UTC

    Karin, yeah I could do that, but I would prefer a solution that forces all occurances to be in sync with each other. That's the whole reason I wanted to use a snippet in the first place.

    Jim

    Translate
    JamesJimAuthor
    Inspiring
    Jul 2, 2021 12:43 AM UTC

    I added a feature request: RH-9619. If you want this feature too, please vote for it

    Translate
    Community Expert
    Jul 2, 2021 12:24 AM UTC

    Unfortunately there's no way to do that in Robohelp. Variables are only designed to be different for different outputs.

     

    You can request features and report issues here: https://tracker.adobe.com/

    Translate
    Community Expert
    Jul 2, 2021 12:39 AM UTC

    Post the item number back here, that way people can easily vote if they want the same functionality.

    Translate