Skip to main content
Participant
June 9, 2010
Question

Any Method or Workaround Available to Insert Variable in Topic Title?

  • June 9, 2010
  • 1 reply
  • 1402 views

We are planning to implement variables in the next release of our Help to ease the replacement of certain terms. We develop webhelp in RH8. While variables work very well for terms within a topic and titles of TOC books and TOC pages, there seems to be a serious problem regarding topic titles and search results.

When you rename TOC books and TOC pages, you can insert a variable in the title, so these update automatically when you change the value of the variable. However, you cannot insert a variable in the topic title (I'm assuming because the <title> tags are in the document head.).This causes a serious problem with search results. For example:

  • You create a variable for the term "Digital Assets," which is the default name of the item. This term is also used in many topic titles, such as "Creating Digital Assets."
  • You insert this variable in all the relevant topics, TOC book titles, and TOC page titles.
  • You change the value of the variable to "Analog Debits." The value is correclty substituted in all instances of the variable in topics & titles.
  • You build the Help. The terminology is correct everywhere.
  • However, when you search for Analog Debits, the topic titles returned are still Creating Digital Assets, etc.

Of course, you can go through and manually change every title occurance of Digital Assets to Analog Debits, rebuild the project, and the search results will be "correctly" titled. However, manual labor on this scale defeats the purpose of variables.

Have I missed an easy way to change topic titles, or is the inability to insert variables in a topic title an oversight that I recommend Adobe address?

Thanks,

Roger

    This topic has been closed for replies.

    1 reply

    Peter Grainge
    Community Expert
    Community Expert
    June 10, 2010

    Topic Title is part of the topic properties so you cannot use variables. However the first heading in the topic does not have to be the same as the Topic Title. Could you not use a variable there? The topic title would remain the same so it might still be caught by search, maybe you could live with that?


    See www.grainge.org for RoboHelp and Authoring tips

    @petergrainge

    Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
    roger832Author
    Participant
    June 10, 2010

    This is exactly what I've done - used a variable in Header 1, which generates search results like these:

    This really isn't acceptable, so I'll just have to coach our customers who want to customize the Help to manually change the appropriate topic titles.

    Captiv8r
    Legend
    June 10, 2010

    Hi all

    Okay, here's a possible workaround for you. I tested this with Version 8 and it seems to work so far.

    In your topic, insert the variable as desired. Then change to HTML view. You should see that the variable exists something like this:

    <?rh-udv_start name="topic" ?>Variable Content Here<?rh-udv_end ?>

    So I copied this and pasted it between the Title tags.

    Before:

    <title>Topic Title here</title>

    After:

    <title><?rh-udv_start name="topic" ?>Variable Content Here<?rh-udv_end  ?></title>

    Then I saved and closed the topic. Note that I DID NOT CHANGE BACK TO DESIGN VIEW. This part is crucial. When you change to Design View, RoboHelp ever so helpfully rewrites your Title tags to remove the variable information you so carefully inserted there.

    I tested this by changing the variable and generating and it does seem to work. That is, UNTIL you open the topic again in Design View. Then it will fail.

    The way I figure it, RoboHelp is going to scan the code looking for the special UDV tags and it won't care if they exist within the title tags.

    Cheers... Rick

    Helpful and Handy Links

    RoboHelp Wish Form/Bug Reporting Form

    Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!

    Adobe Certified RoboHelp HTML Training

    SorcerStone Blog

    RoboHelp eBooks