How do I create a journal title search in Primo VE?

Answer

Ex Libris provides detailed instructions on creating a search box. Follow the link in the Links & Files section.

There are two main components, a <script> tag and a <form>.

Script tag

Place this <script> tag in the head or other applicable location. Some CMS may have a separate field for javascript or <script> tags.

<inst_code:view_code>

This value should resemble 01SUNY_XXX:01SUNY_XXX (though you can have any name for a view code) where SUNY_XXX is your Alma ID.

Find this value in Configuration -> Discovery -> Display Configuration - Configure Views under the code heading.

Begin Script Code:

 <!-- Script that converts the query string into valid parameter -->
<script type="text/javascript">
function searchPrimo() {
document.getElementById("primoQuery").value = "any,contains," + document.getElementById("primoQueryTemp").value.replace(/[,]/g, " ");
document.forms["searchForm"].submit();
}
</script>

Form code:

<form id="simple" name="PrimoSearchForm" method="get" target="_self" action="https://suny-XXX.primo.exlibrisgroup.com/discovery/jsearch" enctype="application/x-www-form-urlencoded; charset=utf-8" onsubmit="searchPrimo()">
<!-- Customizable Parameters -->
<input type="hidden" name="vid" value="<inst_code:view_code>">
<input type="hidden" name="tab" value="jsearch_slot">
<input type="hidden" name="mode" value="basic">
<!-- Fixed parameters -->
<input type="hidden" name="displayMode" value="full">
<input type="hidden" name="bulkSize" value="10">
<input type="hidden" name="highlight" value="true">
<input type="hidden" name="dum" value="true">
<input type="hidden" name="query" id="primoQuery">
<input type="hidden" name="displayField" value="all">
<!-- Enable this if "Expand My Results" is enabled by default in Views Wizard -->
<input type="hidden" name="pcAvailabiltyMode" value="true">
<input type="text" id="primoQueryTemp" value="" size="35">
<!-- Search Button -->
<input id="go" title="Search" onclick="searchPrimo()" type="button" value="Search" alt="Search">
</form>

Topics

  • Last Updated Jul 25, 2023
  • Views 772
  • Answered By Michelle Eichelberger

FAQ Actions

Was this helpful? 0 0