This article will help you implement a custom Google search to your browser output. Google search provides an alternative to the built in search in Browser Help output that is more comprehensive and customizable.
You should carefully evaluate whether Google search is a good fit for your requirements, including any charges that might be made by Google for use of the service (at time of writing Google Custom Search was free for low volume searches).
Google search is only suitable for content that is hosted on a public web site.
The Custom Google Search currently only works with the Classic and Material templates - and not the Light template.
In order to include a custom Google Search in your Browser output, you need to follow these instructions:
- Create a custom search on https://cse.google.co.uk/cse/ by clicking New Search Engine, selecting the domain to search as well as the Language and Name of the Search engine.
- Once you have created your custom search select Look and Feel on the left-hand menu located under Edit Search Engine and then choose Full-width:
- Press the Save and get code button at the bottom - you will need this in step 5.
- Create or open a custom template that is based on the Classic (Browser Help). You can find out how to create a custom template here:
https://innovasys.zendesk.com/hc/en-gb/articles/360000765543-Creating-A-Custom-Template
- On Page Types, edit websearch.html by clicking the edit button on the toolbar. From there, you need to remove all of the content inside the <body> tag and paste your custom Google search code (given after you have done step 3 when you select "Save and Get Code"). Be sure to place it inside of a div element as Google instructs.
- Change the Google search code from:
<gcse:search></gcse:search>
To:
<gcse:search linktarget="webcontent></gcse:search>
- Close your custom template and save when prompted - and remember to select your custom template to be used in the Build Profile Editor under Templates.
- Be sure to have your site indexed via the Google Search Console: https://www.google.com/webmasters/tools/ - you need to do this by submitting a site-map to the Google Search Console. You have to specify the subdirectory or subdomain that you wish to be searchable in the setup of the Google Custom Search, and we would advise you to make sure Google has indexed your entire domain on the search console.
After implementing these steps, your search should look like this:
If you are using the Classic or Material templates, you would need to make some changes in order for Google to navigate to your framed content correctly. You can find out more in this knowledgebase article: https://innovasys.zendesk.com/hc/en-gb/articles/211621103-Include-a-link-to-a-page-with-the-navigation-pane-when-navigating-directly-to-a-Brower-Help-content-page-url
0 Comments