Google Search

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 from var cx = 'xxx'; in the code Google provides. We use our own customised JavaScript rather than Google's, but we need the ID they embed in it.

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.

Licence

Licensed on the same terms as Composr

Images

Back to Top