Search Primo VE - ucsf-ckm/ucsf-library-ux-and-web-documentation GitHub Wiki
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.
We can also link directly to specific types of searches
Direct link to account overview
https://search.library.ucsf.edu/discovery/account?vid=01UCS_SAF:UCSF§ion=overview
Direct link to a blank ILL request
https://search.library.ucsf.edu/discovery/blankIll?vid=01UCS_SAF:UCSF
Links 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
Links 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
Links directly to the Primo VE landing page with the search box drop-down pre-selected for the Journals option
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
Direct search of BrowZine: https://browzine.com/libraries/91/subjects (not related to Primo)
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
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
andonclick
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
tosimpleInstructor
in one case. I don't think thesimple
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.
<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" 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.
<script type="text/javascript">
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>
This is the piece of code with the specific values. It must be dropped into the larger snippet
<form id="simple" name="searchForm" method="get" target="_self" action="https://search.library.ucsf.edu/discovery/jsearch" enctype="application/x-www-form-urlencoded; charset=utf-8">
<input type="hidden" name="vid" value="01UCS_SAF:UCSF">
<input type="hidden" name="tab" value="jsearch_slot">
<input type="hidden" name="lang" value="en">
This is the whole snippet and not related to Primo
<form id="searchBrowzineForm" method="get" action="https://api.thirdiron.com/v2/libraries/91/external-search" target="_self">
<input id="searchBrowzineTerm" title="search" name="query" type="text" placeholder="" />
<input id="searchBrowzineSubmit" type="submit" value="Search Browzine" />
</form>
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/jsearch" enctype="application/x-www-form-urlencoded; charset=utf-8">
<input type="hidden" name="vid" value="01UCS_SAF:UCSF">
<input type="hidden" name="tab" value="jsearch_slot">
<input type="hidden" name="lang" value="en">
<!-- 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>
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>