Skip to main content
Participating Frequently
November 9, 2023
Answered

RoboHelp - Variable not defined error when exporting Responsive HTML

  • November 9, 2023
  • 12 replies
  • 1818 views

We want the Page title on our html pages to be the H1 or H2 heading of each article. We highlighted the headings created variables and then added them to the title field before exporting. something like {TitleHeading} . However when exporting the page title just shoes the {TitleHeading} not the actual variable and says "Variable not defined" . When we go back and look at the variables in robohelp the name and correct values are there. Is there something additional needed for the HTML export for that to pull correctly?

    This topic has been closed for replies.
    Correct answer Peter Grainge

    Ok but I still need to know how you got to that dialog. It's only by finding out things like that, that I can help people.

    ________________________________________________________

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

     


    Never mind, I found them. Variables in Content and Variable Sets in Outputs.

    ________________________________________________________

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

     

    12 replies

    Peter Grainge
    Community Expert
    Community Expert
    November 10, 2023

    Also you are referring to adding to the Book. I am adding the variable in the Topic Properties. That is where you will need it for the browser tab, when we can get your variables recognised in the first place.

    ________________________________________________________

    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.
    NoSupportAuthor
    Participating Frequently
    November 10, 2023

    That may be it. Can you share a screenshot so i can verify what you mean by adding it in the properties please?

    Peter Grainge
    Community Expert
    Community Expert
    November 10, 2023

    I will shortly but please confirm how you get to that New Variable Set dialog. It really would help me help you if you answered each question and not just some.

    ________________________________________________________

    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
    November 10, 2023

    Is the New Variable Set dialog what you see when you click the + icon? Then when you click on a set, the + icon lets you add a variable?

     

    If not, how are you getting that Set dialog?

     

    Also have you selected a set in the preset?

    ________________________________________________________

    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
    November 10, 2023

    I believe this is what you want and it can be set up as you can see.

     

     

    The issue is solely why your variables are not working. It could be you haven't selected a set so RoboHelp doesn't know what to do. If it is not that, then what I have asked about should find a solution.

    ________________________________________________________

    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
    November 10, 2023

    Yes I get what you want. You are not seeing because of some issue and if you please answer my questions we might get somewhere!

     

    There is one possibility that is not Set related. In the preset have you selected one of the Sets you are showing?

    ________________________________________________________

    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.
    NoSupportAuthor
    Participating Frequently
    November 10, 2023

    Looks like i see Variable Set. Yesterday when first testing i think we were doing Variables where you set the variable and a value. We selected the heading we wanted in the book for the variable and tried that. Without really knowing we did try both Variable Set and Variable in the Title both had the same result: Variable not defined.

    Peter Grainge
    Community Expert
    Community Expert
    November 10, 2023

    Variables are fine for what you want but they are not working for you because somehow you are seeing a feature that is not in the released version.

     

    Please click that + icon and tell me what options it shows. I suspect you will see both Sets and Variables. Is that what you see?

     

    If you do create a variable outside a set and see if that works.

     

    Isn't what I have shown you what you were trying to achieve?

    ________________________________________________________

    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
    November 10, 2023

    Adobe's online help does not mention Variable Sets, only Variables. That's why I want you to provide the information requested and see if my idea then works.

    ________________________________________________________

    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.
    NoSupportAuthor
    Participating Frequently
    November 10, 2023

    Maybe variables is not what I am looking for. I visited your website and here is a screenshot from there of what i am trying to akomplish. The Page Title needs to match the Topic title. In our Book the Titles just stays the same as what the index page title is. Example: Welcome when we want it to say... Welcome - Topic Title

    Peter Grainge
    Community Expert
    Community Expert
    November 10, 2023

    Variables are individual items. Sets are grouped.

     

    The fact that you can seeing something different suggests there is something wrong with your installation. Variable Sets should not be visible to the best of my knowledge. Please answer the questions and I should be able to help you.

    ________________________________________________________

    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.
    NoSupportAuthor
    Participating Frequently
    November 10, 2023

    This is what I have. Maybe Variables is not the right way about this. Its mostly about the HTML output and how that displays. 

    Peter Grainge
    Community Expert
    Community Expert
    November 10, 2023

    I just noticed that in RoboHelp I see Variables whereas you show Variable Sets. I am looking into this.

     

    When you click the + sign, what do you see? 

     

    Can you add a variable without it being in a set? Try that if you can.

    ________________________________________________________

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

     

    ________________________________________________________

    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
    November 10, 2023

    Variable Sets vs Variables - missed that completely!

    NoSupportAuthor
    Participating Frequently
    November 10, 2023

    Thank you for all the feedback. I am not sure i understand the difference between the two.

    Peter Grainge
    Community Expert
    Community Expert
    November 10, 2023

    I just ran some tests and this is what I see.

     

    If i add the variable to the topic as in the first image it shows in the Topic Heading. The topic heading is the same as the Topic Title by default but does not have to be.

     

    In the TOC you get the Topic Title. Here I added the variable to the topic title using CTRL Shift 9  

     

     

    Click on the icon to see the shortcut.

     

    ________________________________________________________

    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.
    Community Expert
    November 10, 2023

    I think the Frameless output shows the topic title in the browser tab, but if this is an existing project it might not be easy to swap (CSH calls for example would likely have to be changed in the application, if you're using it). But it's something to look in to if this is a new project. Additionally, Frameless seems to be where Adobe is focussing their efforts going forward.

     

    Peter's Robohelp Tour says variables can be added in to the Output preset field - it would be nice if this also allowed access to the Field variables, but I suspect it doesn't. It would be easy to check, I think - find out what the shortcut key is for inserting into a topic (it was Ctrl+3 in RH2019 but I'm pretty sure that's changed), and see if that shortcut works in the output preset Title field.