Skip to main content
Inspiring
March 3, 2016
Answered

Is there a way to customize "wSearchContext"?

  • March 3, 2016
  • 1 reply
  • 891 views

Operating Environment

RoboHelp 10

Multiscreen_HTML5 output

Search Results Page (screen layout component)

Background

The default Search Results Page screen layout provides the following components for each topic when a user performs a search:

(Topic title formatted as a clickable link)

(Topic file path and file name)

(First 100 words in topic: <?rh-msp-search-result-context class="wSearchContext" ?>)

Issue:

By default, the First 100 words in topic component starts with the topic title. This is redundant. It already appears as a clickable link and (to some degree) in the file path/name. I would like to exclude the title from the First 100 words in topic component. The topics in our project auto-display the title using the RoboHelp title field/variable, so I'm hoping there's a way to specify programmatically/code-wise something like: "For wSearchContext exclude rh_variable_title". I'm not a developer, so I don't know if this is possible and if so how. But if there's a way to do it and someone can tell me how to do it, I am comfortable editing project files (even stuff like search.js or constants.js) to do it.



I appreciate any feedback!

Thanks.

This topic has been closed for replies.
Correct answer Willam van Weelden

This is a bug that was solved in RoboHelp 2015. In the meanwhile, you can change the contact after generation, but you'll probably would want to automate it somehow. If you open one of the 'topictable_x_xml.js files, you'll find the preview information as shown in the search results. The ct attribute is the sample text and it statert with the topic title. You can change the text there. Far from ideal and you will have to repeat the fix whenever you generate. But that's the only way to fix it that I am aware of.

1 reply

Willam van Weelden
Willam van WeeldenCorrect answer
Inspiring
March 4, 2016

This is a bug that was solved in RoboHelp 2015. In the meanwhile, you can change the contact after generation, but you'll probably would want to automate it somehow. If you open one of the 'topictable_x_xml.js files, you'll find the preview information as shown in the search results. The ct attribute is the sample text and it statert with the topic title. You can change the text there. Far from ideal and you will have to repeat the fix whenever you generate. But that's the only way to fix it that I am aware of.

RoboFanAuthor
Inspiring
March 7, 2016

That did it! I agree, far from ideal, but at least there's a way. Not sure I'll do it - probably better to try to convince management to upgrade to RH 2015.

Good stuff, nonetheless!

Thank you!