OER Recommender - Including "Related Resources" Links in a Web Page

Return to home page

Include Related Resources Links by Inserting an HTML Snippet in a Web Page

The easiest way to include OER recommendations in your website is to insert the following snippet into your web pages:

<script type="text/javascript" src="http://www.oerrecommender.org/recommendations.pjs"></script>

The javascript will write the list of recommendations using divs. Style the divs to format the list.

OER Recommender figures out which URL to provide recommendations for by examining the referrer field in the HTTP header of the requesting page. Alternatively, you may explicitly specify the URL to request recommendations for:

<script type="text/javascript" src="http://www.oerrecommender.org/recommendations.pjs?u=http://ocw.usu.edu/Biological_and_Irrigation_Engineering/Surface_Irrigation_Design"></script>

See examples and details

Request Related Resources XML

To request recommendations in xml format, use a url like:

http://www.oerrecommender.org/recommendations.xml?u=http://ocw.usu.edu/Biological_and_Irrigation_Engineering/Surface_Irrigation_Design

The result will look something like:

<?xml version="1.0" encoding="UTF-8"?>
<recommendations document_id="21234">

  <recommendation>
    <id>34998</id>
    <title>Development of instructional systems for teaching an electricity and magnetism course for engineers</title>
    <link>http://www.oerrecommender.org/r?id=55</link>
    <uri>http://dx.doi.org/10.1119/1.19127</uri>
    <relevance>8.5</relevance>
    <clicks>7</clicks>
  </recommendation>

  <recommendation>
    <id>27223</id>
    <title>GEOLAB WWW Server</title>
    <link>http://www.oerrecommender.org/r?id=55</link>
    <uri>http://mathforum.org/library/view/6456.html</uri>
    <relevance>3.5</relevance>
    <clicks>7</clicks>
  </recommendation>

  <recommendation>
    <id>214</id>
    <title>Sprinkle &amp; Trickle Irrigation (USU)</title>
    <link>http://www.oerrecommender.org/r?id=55</link>
    <uri>http://ocw.usu.edu/Biological_and_Irrigation_Engineering/Sprinkle___Trickle_Irrigation</uri>
    <relevance>2.6</relevance>
    <clicks>4</clicks>
  </recommendation>

  <recommendation>
    <id>1168</id>
    <title>Computer Games and Simulations for Investigation and Education 11.127, Spring 2005 (MIT)</title>
    <link>http://www.oerrecommender.org/r?id=55</link>
    <uri>http://ocw.mit.edu/OcwWeb/Urban-Studies-and-Planning/11-127Spring-2005/CourseHome/index.htm</uri>
    <relevance>2.1</relevance>
    <clicks>2</clicks>
  </recommendation>

  <recommendation>
    <id>28048</id>
    <title>Measure and Integration</title>
    <link>http://www.oerrecommender.org/r?id=55</link>
    <uri>http://mathforum.org/library/view/7593.html</uri>
    <relevance>0.5</relevance>
    <clicks>0</clicks>
  </recommendation>

</recommendations>

Link to a Related Resources Page

To link to a page containing recommendations for your resource, use a link like:

<a href="http://www.oerrecommender.org/recommendations?u=http://openlearn.open.ac.uk/course/view.php?name=B821_1">Related Resources</a>

For example: Related Resources

Optional Request Parameters

You can specify options using the query string:

order
mixed - popular items are listed first (ordered by the number of clicks), then highly relevant items (ordered randomly), then other relevant items (ordered randomly). This is the default. Example
relevance - items are ordered by relevance. Example
clicks - items are ordered by number of clicks and then by relevance. Example
limit
Number of items to retrieve. 5 is the default when requesting XML and using the HTML scriptlet. 20 is the maximum that is ever returned. Example
details
Specify true to request that all available details be displayed.

Including Search Results in a Web Page

Insert the following scriptlet into a web page to display search results:

<script type="text/javascript" src="http://www.oerrecommender.org/search/results.pjs?terms=art"></script>

See examples and details

Getting Resources Indexed

The related resources links that OER Recommender provides come from collections that it has indexed. To request that your collection be included, email oerrecommender AT cosl DOT usu DOT edu.