Primo VE Search Widgets

Primo VE can be added to websites through a simple html form and short bit of JavaScript. More information can be found at Primo VE Customization - Best Practices.

Example 3: Books Facet

HTML

To modify the code for a Course Reserves widget, we do the following:

  • Insert the host_name: mnpals-mct.primo.exlibrisgroup.com
  • Insert the inst_code:view_code: 01MNPALS_MCT:MCT
  • Insert the tab_code: Everything
  • Insert the scope_name: MyInst_and_CI
  • Insert the facet line and value: <input type="hidden" name="facet" value="rtype,include,books">
<form id="simple" name="searchForm" method="get" target="_self" action="https://mnpals-mct.primo.exlibrisgroup.com/discovery/search" enctype="application/x-www-form-urlencoded; charset=utf-8" onsubmit="searchPrimo()">
     <!-- Customizable Parameters -->
     <input type="hidden" name="vid" value="01MNPALS_MCT:MCT">
     <input type="hidden" name="tab" value="Everything">
     <input type="hidden" name="search_scope" value="MyInst_and_CI">
     <input type="hidden" name="mode" value="basic">
     <input type="hidden" name="facet" value="rtype,include,books">
     <!-- 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>
            

Search With the Resource Type of Books Preselected

Facet Values

This is where you can find the different values for your facets.

Primo url

The value for the facet can be found in your Primo url. Do a search, select a facet and then look for &facet=

Example url

https://mnpals-mct.primo.exlibrisgroup.com/discovery/search? query=any,contains,health&tab=Physical_library_slot &search_scope=Physical_library_scope&vid=01MNPALS_MCT:MCT &facet=rtype,include,books&mode=basic&offset=0

facet

rtype,include,books