Skip to main content
Inspiring
Aug 24, 2016 8:23 AM UTC
Answered

Set search results to all search words as default in responsive help

Hi - Can anyone help me on this please? Originally posted 24th August but no replies.

Thanks

Hi,

I am using responsive HTML5 help in Robohelp 2015. There is an option for users to tick a box for all search words for an AND search otherwise the default is OR.

Can this be set as default - so that the box is automatically ticked for an AND search?

There isn't an option for this so I guess it will require a code change but I haven't manage to locate the code yet.

Thanks

* I see the same question has been asked for Robohelp 11 but the solution given doesn't seem to work for Robohelp 2015.

http://forums.adobe.com/message/7733536#7733536

This topic is closed to new replies. Start a new post to keep the conversation going.
Willam van Weelden
Willam van WeeldenCorrect answer
Inspiring
Oct 31, 2016 3:45 PM UTC

I'm not sure if it has to do with Update 4, but you never know...

I mean exactly what your image shown: checking AND search by default.

For the output, please contact me at: contact [at] wvanweelden [dot] eu.


I looked into the output and it seems that setting the value doesn't always correctly change the checkbox value. But there is a 'workaround'. By mimicking a user interaction, you can set the AND search when the page is loaded.

In the layouts usersettings.js file, go to line 35, with the text rh.model.publish(xxxx

Add a new line below that and add the code:

setTimeout(function(){

  var rh = window.rh;

  var isAND = rh.model.get(rh.consts('KEY_AND_SEARCH'));

  if(isAND != 1) {

  var checkbox = document.getElementById('andsearch');

  checkbox.click();

  }

  }, 1000);

17 replies

Captiv8r
Legend
Oct 26, 2016 2:11 PM UTC

Have you looked at the customization options? From the SSL recipe, click Customize Selected Layout.

Then click the Search (All) and you see settings that allow you to change behavior.

Cheers... Rick

Translate
gc31Author
Inspiring
Oct 26, 2016 2:15 PM UTC

hi,

Yes thanks i've looked at that. That just turns off the option to select the AND search just leaving OR as the default, I believe?

Translate
Captiv8r
Legend
Oct 26, 2016 3:14 PM UTC

Hmmm, I've been playing with that setting and oddly, it seems to make zero difference in my outputs when I'm testing. Maybe I need to create a fresh layout or perhaps try with the other one.

Translate
Jeff_Coatsworth
Community Expert
Community Expert
Oct 25, 2016 4:07 PM UTC

Are there no topic.slp files in RH2015's \!Screenlayout!\ folder?

Translate
gc31Author
Inspiring
Oct 26, 2016 12:06 PM UTC

Yes this seems to be the file to change but cannot quite get it to work correctly.

Translate
Jeff_Coatsworth
Community Expert
Community Expert
Oct 26, 2016 12:21 PM UTC

Is the change to that file's coding having any effect on the output?

Translate