Tips for using Google Custom Search in my HTML5 project

Participant ,
Feb 15, 2017

Copy link to clipboard

Copied

Hi folks,

Using RH 11.

Has anyone successfully implemented Google's 'Custom Search' in their HTML5 Help project, replacing RH's supplied search solution?

...and if so, how on Earth?

I'm not talking about using Google analytics, but 'custom search' (Add search to your site - Custom Search Help)

Google's page on this says

If you've chosen the two column or two page layout option, you'll need to copy and paste two snippets of code:

  1. Paste the first code snippet where you want the search box to appear.
  2. Paste the second code snippet where you want the search results to appear.

Our Web Dev has given me these two code snippets, but beats me where I'm supposed to put them (despite it sounding really obvious in the explanation).

I imagine I'll have to remove the supplied RH search code too?

TOPICS
HTML5 layout

Views

312

Likes

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

Tips for using Google Custom Search in my HTML5 project

Participant ,
Feb 15, 2017

Copy link to clipboard

Copied

Hi folks,

Using RH 11.

Has anyone successfully implemented Google's 'Custom Search' in their HTML5 Help project, replacing RH's supplied search solution?

...and if so, how on Earth?

I'm not talking about using Google analytics, but 'custom search' (Add search to your site - Custom Search Help)

Google's page on this says

If you've chosen the two column or two page layout option, you'll need to copy and paste two snippets of code:

  1. Paste the first code snippet where you want the search box to appear.
  2. Paste the second code snippet where you want the search results to appear.

Our Web Dev has given me these two code snippets, but beats me where I'm supposed to put them (despite it sounding really obvious in the explanation).

I imagine I'll have to remove the supplied RH search code too?

TOPICS
HTML5 layout

Views

313

Likes

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
Feb 15, 2017 0
LEGEND ,
Feb 15, 2017

Copy link to clipboard

Copied

It needs to go into the Screen Layout (Topic.slp) of the layout. But it's a bit more complicated. The RH search is integrated with the layout and all kinds of events are handeled when a search is started: search results are made visible, other panes will be closed, etc. And then you have the option to show search results in the sidebar or in the topic area.

The easiest try is to replace the search field in the Topic.slp with the Google snippet and replacing the Search results widget in the Topic.slp. Perhaps t works. But I haven't tried it with RoboHelp before.

In the layout, search for 'wSearchField': that will get you the search input field.

Search for: '<?rh-msp-search-results-start' that will get you the start of the search results code

Likes

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
Reply
Loading...
Feb 15, 2017 0