Add search box widget to your site

Edicy provides search widget to search the contents of your site through Google. Adding this widget requires three things included in your templates: a default stylesheet file, google search javascript file and a form with search box. Fortunately, all of them are provided by Edicy. See more inside on how to add working search box to your site.

You can include default stylesheet for your search results from Edicy. Add this code block into the HEAD tag of your templates:

{% if %}
{% stylesheet_link "assets/site_search/2.0/site_search.css" static_host="true" %}
{% endif %}

Next you need to initialize javascript that makes search to Google and draws search results widget:

{% if %}
<script type="text/javascript" src=""></script>
<script type="text/javascript"
<script type="text/javascript" charset="utf-8">
  var search_translations = {
    "search": "{{ "search"|lc }}", "close": "{{ "search_close"|lc }}",
    "noresults": "{{ "search_noresults"|lc }}"
{% endif %}

And finally, make INPUT element with ID onpage_sarch:

{% if %}
<div id="search"><form action="">
<div><input type="text" id="onpage_search"/></div>
{% endif %}

Please note that site object has a property search.enabled that marks whether the search is turned on from site settings view.