Giter Site home page Giter Site logo

primo_search_block's Introduction

primo_search_block

Provides a search block following the recommened implementation by ExLibris in Drupal 7.

Exlibris's instructions

Adding the Search Form to your website

This section will describe the supported parameters to use in the dlSearch request. Adding the JavaScript and HTML code to your website. The following HTML code should be wrapped in a valid HTML file on your website:

At the <head> section of your HTML please add the following JavaScript lines:

<script type="text/javascript"> 
 function enterKey(evt) {
  var evt = (evt) ? evt : event
  var charCode = (evt.which) ? evt.which : evt.keyCode
  if (charCode == 13) {
    searchPrimo()
  }
 } 
 function searchPrimo() {
  document.getElementById("primoQuery").value = "any,contains," + 
    document.getElementById("primoQueryTemp").value;
  document.forms["searchForm"].submit();
 }
 function searchPrimoEvent(event) {
  if (event && event.which == 13) {
    document.getElementById("primoQuery").value = "any,contains," + 
      document.getElementById("primoQueryTemp").value;
    document.forms["searchForm"].submit();
  }
  else
    return true;
 }
 </script>

โ€ƒ In the desired location on the webpage please add the following form:

  <form name="searchForm" role="search" method="get" 
   action="http://<PRIMO_URL:PORT>/primo_library/libweb/action/dlSearch.do" enctype="application/x-www-form-urlencoded; charset=utf-8" id="simple" target="_self"  onsubmit="searchPrimo()">
   <input name="institution" value="<INSTITUTION_CODE>" type="hidden">
   <input name="vid" value="<VIEW_CODE>" type="hidden">
    <input name="search_scope" value="<SEARCH_SCOPE>" type="hidden">
   <input name="group" value="GUEST" type="hidden">
   <input name="onCampus" value="true" type="hidden">
   <input name="displayMode" value="full" type="hidden">
   <input type="hidden" id="primoQuery" name="query" />
   <input type="text" size="25" id="primoQueryTemp" value="" name="queryTemp" onkeypress="return searchPrimoEvent(event)" />
   <input id="go" type="button" value="Search" title="Search" style="background:#fff2c6; color: #8a8372; border:3px solid; margin-top: 5px; margin-left: 125px;" onclick="searchPrimo()" alt="Search">
  </form>

The following attributes should be modified to fit your Primo configuration:

  • <PRIMO_URL:PORT>- This needs to be your Primo Front End, or Load Balancer address if you have an MFE environment. Example: primo-demo.exlibrisgroup.com:1701
  • <INSTITUTION_CODE> - This needs to be your Primo Institution Code. Example: NORTH
  • <VIEW_CODE> - This field specifies the View Code which the dlSearch will search at. Example: NORTH_VU01
  • <SEARCH_SCOPE> - This field specifies the search scope within the View Wizard. Example: Primo_Central

Customizing your added search box

\

primo_search_block's People

Contributors

bassettsj avatar

Stargazers

Junior Tidal avatar David Bass avatar

Watchers

James Cloos avatar  avatar Junior Tidal avatar  avatar  avatar

primo_search_block's Issues

Any chance of a Drupal 8 version?

This is a great module and would be perfect for our Medical Library.
However, we run Drupal 8.
Any chance someone could make a Drupal 8 version?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.