Skip to main content

Rutland Information Service

Using the Rutland Search Widget

About the Search Widget

The Rutland Search Widget allows you to embed a search facility for the Rutland Information Service directly into your website. This will give your customers the ability to find relevant services without ever leaving your website. All information is pulled directly from the Rutland Information Service website which means it is always up to date.

For further information on the Search Widget please see the FAQs.

How to embed the Search Widget

Step 1 - Requesting Access

Before you are able to proceed with the process of embedding the Search Widget, you must fulfill the following two criteria:

  1. You must have a valid license, called an API Key. Without it, the Search Widget will not return results and an error message will be displayed.
  2. The domain/IP address of your website must be included in an ‘Allow’ list. Without this inclusion, the Search Widget will not return results and an error message will be displayed.


In order to enable the Search Widget please contact Rutland County Council via this link, or by sending an email to ris@rutland.gov.uk with the subject line ‘Search Widget Request’. You must provide the following information:

  1. Your Name, Email address and Telephone number. 
  2. The Name and Address (URL) of your website.
  3. The purpose/theme of your website so that we can ascertain the suitability of providing the search widget. For example: “Our site provides information and advice to local volunteers and charities.”


Once we have received your request we may contact you for further information.

If your request to embed the Search Widget is granted, we will supply an API key by email.

Step 2 - Adding the Search Widget to your site

Location

Before you add the Search Widget to your site, decide which page, and where on that page, you would like it to appear. We recommend you consider the location that is most relevant to the Widget’s content as the best position for it. This may be your Homepage, or another page within your site.

Once you have chosen the page for the Widget to appear on, you then need to consider its position within that page. This will usually be a column, or sidebar, at least half the width of the page (for a page width of 960 pixels), or a quarter of the width (if the page is wider). We recommend that you do not make the Widget narrower than 300 pixels.

We also recommend the Widget be at least 700 pixels in height, so that search results are displayed with minimal scrolling for the user.

Code

Once you have decided on the location for the Widget, you can proceed to adding the code into your web page. Below is the required code:

<div id="oo-widget-placeholder"></div>

<script type="text/javascript" src="http://widgets.openobjects.com/2/app.js"></script>
<script type="text/javascript">
  loadWidget("#oo-widget-placeholder",{apiKey: "<your api key>"});
</script>

This code consists of the following:

  1. <div id="oo-widget-placeholder"> - This is the start of the Widget. Please ensure there are no other elements on your page with the same ID name.
  2. <script type="text/javascript" src="//widgets.openobjects.com/2/app.js"></script> - This is the script for the Widget to function.
  3. loadWidget("#oo-widget-placeholder",{ apiKey: "<your api key>" }); - Replace the code ‘<your api key>’ with the actual API key supplied by Rutland County Council.

Once you have inserted this code, including your API Key, into your web page, refresh the website. The Search Widget should now appear. If the Widget does not load, or it does not appear to be functioning correctly, please re-check you have followed the above instructions. If problems persist, please contact ris@rutland.gov.uk.

Back to top