2017 © Pedro Peláez
 

silverstripe-module silverstripe-googlesitesearch

Add Google Site Search to your SilverStripe Site.

image

dnadesign/silverstripe-googlesitesearch

Add Google Site Search to your SilverStripe Site.

  • Friday, August 12, 2016
  • by wilr
  • Repository
  • 9 Watchers
  • 9 Stars
  • 4,416 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 8 Forks
  • 1 Open issues
  • 2 Versions
  • 7 % Grown

The README.md

Google Site Search Module

Requirements

  • SilverStripe 4

Documentation

Adds the ability for a user to search the site through Google Site Search. This is done via a new Page in the CMS (GoogleSiteSearchPage) and results are fetched from Google via ajax. The search form and results are free to style via CSS., (*1)

1) Sign up for www.google.com/sitesearch 2) Install this module to your site root folder named googlesitesearch 3) Rebuild your database using dev/build 4) Enter your Google CSE CX and key values in the CMS under a new instance of the newly added GoogleSiteSearchPage or through the config flag GoogleSiteSearchPage.cse_key and GoogleSiteSearchPage.cse_cx respectively., (*2)

5) Add the default search form to your controller (or use your own extension for styling / changing the form). In mysite/_config/googlesitesearch.yml add the following:, (*3)

Controller:
  extensions:
  - GoogleSiteSearchDefaultFormExtension

6) Add a search form to your Page.ss template $GoogleSiteSearchForm, (*4)

Ensure you read the Google Custom Search Terms before installing the module and agree to the terms and conditions https://www.google.co.nz/cse/docs/tos.html, (*5)

Customization

Full HTML control is available by providing a custom GoogleSiteSearchPage template on the page. Since the results are loaded via AJAX, John Resig's Micro Templating is used to provide basic utility templates in results, header and footer templates., (*6)

Out of the box a basic header message and pagination in the footer is provided but you are free to alter the page as you need to. More documentation on the available data to output to the template (such as file information) is at developers.google.com/custom-search/v1/using_rest, (*7)

The Versions

12/08 2016

dev-master

9999999-dev https://github.com/dnadesign/silverstripe-googlesitesearch

Add Google Site Search to your SilverStripe Site.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe seo googlesitesearch

12/08 2016

1.0.0

1.0.0.0 https://github.com/dnadesign/silverstripe-googlesitesearch

Add Google Site Search to your SilverStripe Site.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe seo googlesitesearch