7 Replies Latest reply on May 10, 2017 6:13 AM by PMROBO

    Topics display expanded glossary text as the default

    raylangivens Level 1

      I have a WebHelp project created with RoboHelp 2015. I am having trouble with glossary text automatically expanding without clicking a glossary term in a topic. This appears to be associated with the Search feature. For example:

       

      1. Open the WebHelp output in IE or Chrome.
      2. In the Search box, type in a term or phrase (for example, "Agent")
      3. Click any of the topics returned by the search.
      4. Any topic that has a glossary term automatically displays the expanded glossary text.

      This should not be happening. When you open a topic, regardless of whether you found it via search, the TOC, or whatever, glossary terms should not automatically display the expanded glossary text. You should have to click the term to display the expanded text.

       

      Has anyone run into this issue? Any suggestions for how to fix it?

        • 1. Re: Topics display expanded glossary text as the default
          Willam van Weelden Adobe Community Professional & MVP

          Are all glossary texts expanded? Or only the ones that contain search words found in the search?

           

          The second scenario is as designed. If the reader searches for a word and goes to the page, RoboHelp will highlight all occurances. Also the ones in a dropdown. Not doing this can be confusing for your reader as they may not see the word they were searching for.

           

          You can also disable search highlighting. That should stop the behaviour as well.

          • 2. Re: Topics display expanded glossary text as the default
            raylangivens Level 1

            Hi Willam,

             

            It's only the glossary entries that contain the words you searched for and found in the search. Thank you for clarifying how expanding glossary text works. We can live with it. Disabling search highlighting isn't an option. If you're searching on a term, open a long topic with that term and the term isn't highlighted, there was no point in searching for it.

             

            That said, My Doc colleagues and i think the way RH handles expanding glossary items is a poor design. If you search on an entry such as "Agent," and open a topic that has an Agent entry in the glossary, that entry doesn't expand because you don't use the word "Agent" to define an Agent. So far so good. The problem is that any other glossary terms in the topic that reference "Agent" get expanded. For example, if the topic with the Agent glossary item also has a glossary item called "Data Loss Prevention" that references the word "Agent," the "Data Loss Prevention" item gets expanded (and probably confuses the user). IMO, glossary entries should only be expanded when you click them.

            • 3. Re: Topics display expanded glossary text as the default
              Willam van Weelden Adobe Community Professional & MVP

              I would suggest submitting a feature request with Adobe for this: Home  Give them a reference to this thread.

               

              Here is how to solve the issue so Glossary Hotspots are not expanded by default:

              1. In your output, open the file whtopic.js with a text editor such as Notepad++.
              2. Go to line 339. It will look like this:
              else if((tagname == "span" && parent.className == "expandtext") ||                (tagname == "span" && parent.className == "glosstext")
              1. Remove the option for glosstext:
              else if((tagname == "span" && parent.className == "expandtext"))
              1. Save the file.

               

              The auto expand is now disabled. If you want this behaviour to automatically be in place whenever you generate, you will also have to modify the seed file in a similar manner.

               

              The seed file is: C:\Program Files (x86)\Adobe\Adobe RoboHelp 2015\RoboHTML\WebHelp5Ext\template_stock\whtopic.js

               

              Same line nubers.

              1 person found this helpful
              • 4. Re: Topics display expanded glossary text as the default
                raylangivens Level 1

                Hi Willam,

                 

                Thank you for your suggested workaround. I built the help and then deleted the line as you directed in step 3 from whtopic.js.  I'm sorry to report that it didn't resolve the issue I described above. To clarify this issue:

                 

                The word "Agent" is a glossary term. If you search on "Agent," and then open a topic that has the "Agent" glossary term, the "Agent" term  doesn't expand because the word Agent is not used to define an Agent. However, if the topic contains other glossary terms whose definitions include the word "Agent," all of those terms get expanded. Here's an image with examples. The term I searched on was "Agent." That term didn't expand, but the instances of that term within other definitions did. See the items with a red outline.

                 

                glossary_expansion_example.png

                 

                Is there a workaround to resolve this?

                1 person found this helpful
                • 5. Re: Topics display expanded glossary text as the default
                  Willam van Weelden Adobe Community Professional & MVP

                  That's exactly what the code change above achieves. The DGMC won't be expanded if you update the line as indicated.

                   

                  Perhaps something went wrong in the coding. Please try this modified whtopic.js: whtopic.js - Google Drive

                  1 person found this helpful
                  • 6. Re: Topics display expanded glossary text as the default
                    PMROBO Level 1

                    Hi Wil,

                     

                    Since there is no option in Rh 11 to auto display/expand hotspots and rather having the user clicking the hotspot term within the CHM (Online Help) to show the definition, what would be the code be to edit auto-enable hotspots?

                     

                    Currently, the code snippet shown in my whtopic.js is as follows:

                     

                    functionshowHighlightedElement(highlightElement) {

                      //display a dropdown/expand text if highlighted element is inside it

                      var parent = highlightElement.parentNode;

                      while( (typeof parent != 'undefined') && parent != null )

                      {

                      vartagname = parent.tagName.toLowerCase();

                      if( tagname == 'body')

                      break;

                      if( (tagname == "div" && parent.className == "droptext"))

                      {

                      if(parent.style.display == "none")

                      parent.style.display = "";

                      vardsId = getDropSpotId(parent.getAttribute("id"));

                      if(dsId != null)

                      {

                      vardsElem = document.getElementById(dsId);

                      showHighlightedElement(dsElem);

                      }

                      }

                      else if((tagname == "span" && parent.className == "expandtext") ||

                      (tagname == "span" && parent.className == "glosstext"))

                      {

                      if(parent.style.display == "none")

                      parent.style.display = "";

                      }

                      parent = parent.parentNode;

                      }

                    }

                     

                     

                    Thank you,

                    ~PM

                    • 7. Re: Topics display expanded glossary text as the default
                      PMROBO Level 1

                      Wil's post "Expand Drop-Downs by default" I found was the answer to my question.

                       

                      Thanks!

                      ~PM

                      1 person found this helpful