Search Primo VE - ucsf-ckm/ucsf-library-ux-and-web-documentation Wiki

UC Library Search

At the end of July 2021, UCSF began using Alma and Primo VE as part of a larger UC-wide shift to centralized catalog and discovery. MyAccess/Shibboleth is integrated, so users will be prompted to login when necessary. Users can go directly to Primo at https://search.library.ucsf.edu.

Specific searches

We can also link directly to specific types of searches

Borrower login

Direct link to account overview https://search.library.ucsf.edu/discovery/account?vid=01UCS_SAF:UCSF&section=overview

ILL request

Direct link to a blank ILL request https://search.library.ucsf.edu/discovery/blankIll?vid=01UCS_SAF:UCSF

Course reserves

Link directly to the Primo VE landing page with the search box drop-down pre-selected for the Course Reserves option https://search.library.ucsf.edu/discovery/search?vid=01UCS_SAF:UCSF&tab=CourseReserves&search_scope=CourseReserves&lang=en

Archives and Special Collections

Link directly to the Primo VE landing page with the search box drop-down pre-selected for the Archives and Special Collections option https://search.library.ucsf.edu/discovery/search?&tab=ASC&search_scope=ASC&vid=01UCS_SAF:UCSF&lang=en&offset=0

Journals

We include an embedded search box on /journals. To link directly to the Primo VE landing page with the search box drop-down pre-selected for the Journal Search option https://search.library.ucsf.edu/discovery/jsearch?vid=01UCS_SAF:UCSF

Ebooks

No solution to link to a pre-filtered search? To find ebooks in Primo you do a keyword search and then set the facets in your results so that Resource Type is Books and Availability is Available online


Embedded search boxes

We also want to embed search boxes in various places. ExLibris has some documentation, but the version from SUNY is more clear on where the campus-specific parameters plug in.

These are the UCSF-specific parameters, but note that they are not free-standing and will always be part of a larger code-snippet.

<form id="simple" name="searchForm" method="get" target="_self" action="https://search.library.ucsf.edu/discovery/search" enctype="application/x-www-form-urlencoded; charset=utf-8" onsubmit="searchPrimo()">
<input type="hidden" name="vid" value="01UCS_SAF:UCSF">
<input type="hidden" name="tab" value="Everything">
<input type="hidden" name="search_scope" value="DN_and_CI">
<input type="hidden" name="lang" value="en">
<input type="hidden" name="pcAvailability" value="false">

NOTES from Rich Trott

Here are what the snippets should look like without onsubmit and onclick so that the WordPress interface doesn't mess with them. You'll also want to make sure the home page one is updated with the current placeholder and any other changes it might not have. https://gist.github.com/Trott/7966ad0fb4835ac2f7785c1730c703f3

One thing I had to do was change the form ID from simple to simpleInstructor in one case. I don't think the simple ID is used for styling or anything like that, but test that form carefully and look closely at it just in case, I guess?

CORRECTED the below snippets

The full snippet used in the html widget that powers the home page search.

<script type="text/javascript">
      function searchPrimo() {
             document.getElementById("primoQuery").value = "any,contains," + document.getElementById("primoQueryTemp").value;
             document.forms["searchForm"].submit();
      }

      function searchKeyPress(e) {
            if (typeof e == 'undefined' && window.event) {
                  e = window.event;
            }
            if (e.keyCode == 13) {
                  document.getElementById('go').click();
            }
      }
</script>

<form id="simple" name="searchForm" method="get" target="_self" action="https://search.library.ucsf.edu/discovery/search" enctype="application/x-www-form-urlencoded; charset=utf-8">
<input type="hidden" name="vid" value="01UCS_SAF:UCSF">
<input type="hidden" name="tab" value="Everything">
<input type="hidden" name="search_scope" value="DN_and_CI">
<input type="hidden" name="lang" value="en">
<input type="hidden" name="pcAvailability" value="false">

<!-- Fixed parameters -->
<input type="hidden" name="query" id="primoQuery">
<input type="text" placeholder="surgical AND evaluat*" id="primoQueryTemp" value="" size="35">

<!-- Search Button -->
<input id="go" title="Search" type="button" value="Search" alt="Search">
</form>

<script>
      document.getElementById('simple').addEventListener('submit', searchPrimo);
      document.getElementById('go').addEventListener('click', searchPrimo);
</script>

The full snippet used in the html widget that powers the course reserves by name/number search.

      function searchPrimo() {
             document.getElementById("primoQuery").value = "any,contains," + document.getElementById("primoQueryTemp").value;
             document.forms["searchForm"].submit();
      }

      function searchKeyPress(e) {
            if (typeof e == 'undefined' && window.event) {
                  e = window.event;
            }
            if (e.keyCode == 13) {
                  document.getElementById('go').click();
            }
      }
</script>

<form id="simple" action="https://search.library.ucsf.edu/discovery/search" enctype="application/x-www-form-urlencoded; charset=utf-8" method="get" name="searchForm" target="_self"><input name="vid" type="hidden" value="01UCS_SAF:UCSF" />
<input name="tab" type="hidden" value="CourseReserves" />
<input name="search_scope" type="hidden" value="CourseReserves" />
<input name="lang" type="hidden" value="en" />
<input name="pcAvailability" type="hidden" value="false" />

<!-- Fixed parameters -->
<input id="primoQuery" name="query" type="hidden" />
<input id="primoQueryTemp" size="35" type="text" value="" placeholder="" />

<!-- Search Button -->
<input id="go" title="Search" alt="Search" type="button" value="Search" />
</form>

<script>
      document.getElementById('simple').addEventListener('submit', searchPrimo);
      document.getElementById('go').addEventListener('click', searchPrimo);
</script>

<em>Example: N 142</em>

The full snippet used in the html widget that powers the course reserves by instructor search.

     function searchPrimoInstructor() {
            document.getElementById("primoQueryInstructor").value = "course_instructor,contains," + document.getElementById("primoQueryTempInstructor").value;
            document.forms["searchFormInstructor"].submit();
     }
     function searchKeyPress(e) {
           if (typeof e == 'undefined' && window.event) {
                 e = window.event;
           }
           if (e.keyCode == 13) {
                 document.getElementById('goInstructor').click();
           }
     }
</script>

<form id="simpleInstructor" action="https://search.library.ucsf.edu/discovery/search" enctype="application/x-www-form-urlencoded; charset=utf-8" method="get" name="searchFormInstructor" target="_self"><input name="vid" type="hidden" value="01UCS_SAF:UCSF" />
<input name="tab" type="hidden" value="CourseReserves" />
<input name="search_scope" type="hidden" value="CourseReserves" />
<input name="lang" type="hidden" value="en" />
<input name="pcAvailability" type="hidden" value="false" />

<!-- Fixed parameters -->
<input id="primoQueryInstructor" name="query" type="hidden" />
<input id="primoQueryTempInstructor" size="35" type="text" value="" placeholder="" />

<!-- Search Button -->
<input id="goInstructor" title="Search" alt="Search" type="button" value="Search" />
</form>

<script>
      document.getElementById('simpleInstructor').addEventListener('submit', searchPrimoInstructor);
      document.getElementById('goInstructor').addEventListener('click', searchPrimoInstructor);
</script>

<em>Example: Buss</em>

NOT YET CORRECTED

Archives and Special Collections Primo search

The full snippet used in the html widget that powers the archives filtered search

<script type="text/javascript">
      function searchPrimo() {
             document.getElementById("primoQuery").value = "any,contains," + document.getElementById("primoQueryTemp").value;
             document.forms["searchForm"].submit();
      }

      function searchKeyPress(e) {
            if (typeof e == 'undefined' && window.event) {
                  e = window.event;
            }
            if (e.keyCode == 13) {
                  document.getElementById('go').click();
            }
      }
</script>

<form id="simple" name="searchForm" method="get" target="_self" action="https://search.library.ucsf.edu/discovery/search" enctype="application/x-www-form-urlencoded; charset=utf-8">
<input type="hidden" name="vid" value="01UCS_SAF:UCSF">
<input type="hidden" name="tab" value="ASC">
<input type="hidden" name="search_scope" value="ASC">
<input type="hidden" name="lang" value="en">
<input type="hidden" name="pcAvailability" value="false">

<!-- Fixed parameters -->
<input type="hidden" name="query" id="primoQuery">
<input type="text" placeholder="" id="primoQueryTemp" value="" size="35">

<!-- Search Button -->
<input id="go" title="Search" type="button" value="Search" alt="Search">
</form>

<script>
      document.getElementById('simple').addEventListener('submit', searchPrimo);
      document.getElementById('go').addEventListener('click', searchPrimo);
</script>

Archives and Special Collections OAC search

This is the whole snippet and not related to Primo

<form id="searchArchivesOacForm" action="https://www.oac.cdlib.org/search" target="_self">
<input id="searchArchivesOacTerm" title="search" name="query" type="text" placeholder="dritz papers" />
<input id="searchArchivesOacSubmit" type="submit" value="Search OAC" />
<input name="institution" type="hidden" value="UC San Francisco" /></form>