This module allows BrowserCMS to integrate with a Google Custom Search. Google Custom Search is a search product, which can be configured to crawl your website(s). This module submits queries to the google custom search site, and formats the results. It consists of the following two portlets.
- Search Box - Displays an input box that submits a search query.
- Google Custom Search Results Portlet - Sends query to the custom search engine, formats the XML response and displays the results.
Note: This module assume the BrowserCMS web site owner has access to their own Google Custom Search, which is a user pays service.
There are two basic steps to setting up this module:
- Configure your Google Custom Search to crawl your site.
- Install the module and configure it to point to your Google Custom Search.
These instructions assume the Custom Search is already set up and running.
These instructions assume you have successfully installed the bcms_google_custom_search module into your project. To make the module work, you will have to configure two portlets.
- In your sitemap, create a new section called 'Search', with a path '/search'.
- Create a page called 'Search Results', with a path '/search/search-results'.
- On that page, add a new 'Google Custom Search Engine' portlet. Keep the default for most fields.
- In the Search ID field, enter in the unique identifier provide by google, for your custom search
- Make sure the 'path' attribute is the same as the page you are adding the portlet to (i.e. /search/search-results
- Save the portlet
- On another page create a Search Box portlet (alternatively, you can create the portlet and add it your templates via render_portlet)
- Set the 'Search Engine Name' field to the exact same name as the portlet in step B.3 above (i.e. Google Custom Search Engine)
- Save the portlet
At this point, you can test the search by entering in a term to the Search Box portlet. If its working, it should call the Search Results page and display the same results as what you see in the Custom Searchs' admin portal.