Skip to main content
Inspiring
August 24, 2016
Answered

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

  • August 24, 2016
  • 2 replies
  • 1689 views

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 has been closed for replies.
Correct answer Willam van Weelden

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);

2 replies

Captiv8r
Legend
October 26, 2016

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

gc31Author
Inspiring
October 26, 2016

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?

Captiv8r
Legend
October 26, 2016

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.

Jeff_Coatsworth
Community Expert
Community Expert
October 25, 2016

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

gc31Author
Inspiring
October 26, 2016

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

Jeff_Coatsworth
Community Expert
Community Expert
October 26, 2016

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