• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Topics display expanded glossary text as the default

Explorer ,
May 17, 2016 May 17, 2016

Copy link to clipboard

Copied

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?

Views

810

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , May 21, 2016 May 21, 2016

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.

Votes

Translate

Translate
LEGEND ,
May 21, 2016 May 21, 2016

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 21, 2016 May 21, 2016

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 30, 2016 May 30, 2016

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 31, 2016 May 31, 2016

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 04, 2016 Jun 04, 2016

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 08, 2017 May 08, 2017

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 10, 2017 May 10, 2017

Copy link to clipboard

Copied

LATEST

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

Thanks!

~PM

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp