Compago

...free knowledge

 
  • Increase font size
  • Default font size
  • Decrease font size
Home Manuali Utilità How to add Google Custom Search to Joomla website

How to add Google Custom Search to Joomla website

E-mail Stampa PDF

You know that with Google Custom Search(Google CSE), you can harness the power of Google to create a customized search experience for your own website.

What we show in this article is to explain how to insert the google CSE in a Joomla website, without installing any components or plugins, but only with the help of blank module.

First you must then install the blank module or, if you have it already installed, you need only create one with the module management.

Second you will create the necessary code from the site to Google CSE.

Our aim is to create an area in our page, which will insert the word or phrase to search, and the search result will be displayed at the center of the page where it usually shows the contents of an article.

Then proceed with the creation of the CSE, by entering its name, description, language and the sites concerned.
Among the various options you choose "Two pages", so the module containing the search box will be displayed in the pages that you want and the location that you like, while the results will show only when needed and only as if they were content.

To finish the configuration of the code that you enter you have to create a vacuum and use his article as a url parameter in the configurator.

Another option is the name of the parameter for the search string, which defaults to "q" but you can change it as you please.
In practice, if I create an article:

http://www.yoursite.com/mysearch.html

and wanted to search for the word "dog" to activate the search engine you should use the string:

http://www.yoursite.com/mysearch.html?q=dog

What remains now is copy the code search box in the blank module configuration and the code results in the empty article content.

To insert the javascript code into the post you will need to have permission to do so and you have to change the configuration editor. In case you were using TinyMCE you can follow this guide: http://www.compago.it/manuali/35-utilita/355-come-abilitare-gli-iframe-con-tinymce-in-joomla.html

In conclusion, when you go to do a test on your CSE remember that if the site is new probably pass will not be shown any results, so let Google time to index it.

I make this simple video tutorial about this procedure:

Ultimo aggiornamento ( Martedì 27 Marzo 2012 13:22 )  
Loading

Login