Manchester eScholar Services

Supported by The University of Manchester Library

Note: From March 2016 Manchester eScholar will be replaced with a new Research Information System called Pure. Once Pure goes live, programmatic access to data related to research outputs via the Manchester eScholar API will be permanently unavailable. To discuss existing integrations with the API please contact us via email at escholar@manchester.ac.uk.

Documentation

Using the jQuery widget

Introduction

Manchester eScholar search is powered by Apache Solr and lightly wrapped by a custom server component and Javascript API. Manchester eScholar searches can be customised and embedded into other pages/services.

How to embed Manchester eScholar search results into your web page

The easiest way to have Manchester eScholar search results embedded into a web page is to follow the example below. This is a fully functional standalone page. Styling has been removed to facilitate custom styling:


<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Search Plugin Demo</title>

<!-- Copy this into your document head tag - start -->
<script src="https://www.escholar.manchester.ac.uk/api/jquery-widget/js/jquery-1.9.1.min.js" type="text/javascript"></script>
<script type="text/javascript" src="https://www.escholar.manchester.ac.uk/javascript/jquery-ui-1.8.4.custom.min.js"></script>
<script type="text/javascript" src="https://www.escholar.manchester.ac.uk/api/jquery-widget/js/escholar.js"></script>
<script type="text/javascript" src="https://www.escholar.manchester.ac.uk/api/jquery-widget/js/searchDemo.js"></script>
 
<style type="text/css">
	.searchQuery{
		display:none;
	}	
	.navLink {
		border: 1px solid transparent;
		padding: 0.2em 0.5em;
		text-decoration: underline;
	}	
</style>
<!-- Copy this into your document head tag - end -->
</head>
<body>
<!-- Copy this anywhere into your document body. NB: This can be nested inside other div tags etc... - start -->
<div id="content">
    <div id="search-simpleform">
      <input id="searchBox" type="text" /> <input id="search_button" type="button" value="Search" /> <input id="clear_button" type="button" value="Clear" />
    </div>
    <div id="search-facets">   
      <div id="facets" class="facets"></div>
    </div>
    <div id="search-results">
      <div id="results" class="results"></div>
      <div id="resultsNavigation"></div>
      <div id="document"></div>
    </div>
    <div id="templates" style="display: none;">
      <div id="resultTemplate" class="result" style="display: none;">
        <div class="title"></div>
        <div class="authors"></div>
        <div class="publisher"></div>
        <div class="contentType"></div>
        <div class="escholarRef">eScholarID: </div>
      </div>
      <div id="facetGroupTemplate" class="facetGroup" style="display: none;">
        <div class="facetGroupHeader"></div>
      </div>
      <div id="facetTemplate" class="facet" style="display: none;">
        <div class="facetTitle"></div>
        <div class="facetItem"></div>
      </div>
      <div id="editFacet">
        <textarea class="editFacetInput" rows="5" name="fq"></textarea>
      </div>
    </div>
  </div>
<!-- Copy this anywhere into your document body. NB: This can be nested inside other div tags etc... - end -->
  </body>
</html>
    
To embed this into an existing page simply copy and paste the annotated portions as indicated.

The result of this is listing of all Manchester eScholar records. An example of this output is shown below

How to display your own custom search results

The results demonstrated above are the result of a generic search, searching all of eScholar. If you wish to display only certain items, say only for your particular school/faculty. The easiest way to do this is to
  1. download the searchDemo.js.zip file from our downloads site, save and unzip.
  2. sculpt your search using the query builder
  3. copy your custom query from the query builder page
  4. edit your downloaded searchDemo.js file by pasting your copied custom query into lines 2-5 and save
  5. change the reference to the searchDemo.js file in your web page to point to your custom copy.

Example queries can be viewed here.

Further help with more complex queries may be sought by contacting the eScholar services team.