Skip to Main Content

LIbguides Presentation: Adding a OneSearch Box to a LibGuide

Creating a OneSearch Box

1. Log in to the OLS Support site.

2.  Hover over Systems in the menu bar and Click on Primo.

3.  Scroll down to page and click on Search Box.

4.  The copy the code that is provided on that page to create a search box.

5.  The code contains "XX" and  "xx" you must change the code to your college's 2 letter ALEPH OWN Code.   

6.  Once you have created the box add some text to explian to your patrons and run a search.

OneSearch Box Code

Search Box

Libraries wishing to add a OneSearch search box to their websites are encouraged to do so. It is a simple widget:

 

Please use the following code, customizing it for your library:

<form name="searchForm" role="search" method="get" action="http://onesearch.cuny.edu/primo_library/libweb/action/dlSearch.do" enctype="application/x-www-form-urlencoded; charset=utf-8" id="simple" target="self">
<input name="institution" value="XX" type="hidden">
<input name="vid" value="xx" type="hidden">
<input name="group" value="GUEST" type="hidden">
<input name="onCampus" value="true" type="hidden">
<input name="search_scope" value="everything" type="hidden">
<input name="query" id="primoQuery" type="hidden">
<input type="text" size="35" id="primoQueryTemp" value="" name="queryTemp">
<input value="Search" id="go" class="button" title="Search books, articles & more" alt="Search" type="submit" onclick="searchPrimo()">
</form>
<script type="text/javascript"> 
function searchPrimo(){
document.getElementById("primoQuery").value = "any,contains," + document.getElementById("primoQueryTemp").value;
document.forms["searchForm"].submit();
}
</script>

Replace XX with your 2-letter Aleph OWN codeCapitalization matters! XX refers to your code in uppercase letters whereas xx refers to your code in lowercase letters.