Google Search

(25 KB)

93
259
Embed Google site search onto your site.

This addon consists of two blocks: a side block with the google search form and a main block, where google results are displayed. When you install this addon it will create a standard results page called _google_search; this page can be edited or customised in the same way as any other page.

In addition you can create your own page or put a main_google_results block on an existing page. When you add the side_google_search block you can choose a page_name parameter, but it is only needed if you are sending the results to a non-default page you have added the google results block on.

Example:

Code

[block id="xxx"]side_google_search[/block]
The xxx is what Google provides. We use our own customised JavaScript rather than Google's, but we need the ID they embed in it. On the Google Look and feel settings set the layout to "Results only".

You must enable the "Allow unsafe JavaScript" for this addon to work, which will lower your security. Unfortunately Google require this.

Note that it is a requirement that your _google_search page is in a zone where the side search block displays, as these two interface together once a search is initiated.

Website Software Requirements

Minimum version: 11


Licence

Licensed on the same terms as Composr

Images

Rating

Unrated