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">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" 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">
<!-- Fixed parameters -->
<input type="hidden" name="query" id="primoQuery">
<div style="display:flex; gap:0;">
<input type="text" placeholder="Search articles, books, and more" id="primoQueryTemp" value="" size="35"><button id="go" title="Search" onclick="searchPrimo()"><i class="fa-solid fa-magnifying-glass" aria-label="Search"></i></button>
</div>
</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" />
<!-- Fixed parameters -->
<input id="primoQuery" name="query" type="hidden" />
<div style="display:flex; gap:0;">
<input id="primoQueryTemp" style="width:50%" type="text" value="" placeholder="" aria-label="search terms"><button id="go" title="Search" onclick="searchPrimo()"><i class="fa-solid fa-magnifying-glass" aria-label="Search"></i></button>
</div>
</form>
<script>
document.getElementById('simple').addEventListener('submit', searchPrimo);
document.getElementById('go').addEventListener('click', searchPrimo);
</script>
<em>Example: N 142</em>This is the piece of code with the specific values. It must be dropped into the larger snippet
<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?vid=01UCS_SAF:UCSF" 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="jsearch_slot">
<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">
<div style="display:flex; gap:0;">
<input type="text" placeholder="Search for journals by title or ISSN" id="primoQueryTemp" value="" size="35"><button id="go" title="Search" onclick="searchPrimo()"><i class="fa-solid fa-magnifying-glass" aria-label="Search"></i></button>
</div>
</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/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="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">
<div style="display:flex; gap:0;">
<input type="text" placeholder="" id="primoQueryTemp" value="" size="35"><button id="go" title="Search" onclick="searchPrimo()"><i class="fa-solid fa-magnifying-glass" aria-label="Search"></i></button>
</div>
</form>This is the whole snippet and not related to Primo
<form id="searchArchivesOacForm" name="oacSearchForm" method="get" action="https://oac.cdlib.org/search" target="_self">
<div style="display:flex; gap:0;">
<input style="width:90%; border: 0px solid white;" id="searchArchivesOacTerm" title="Enter search terms here" name="q" type="text" placeholder=""><button id="searchArchivesOacSubmit" title="Search OAC" onclick="document.oacSearchForm.submit()"><i class="fa-solid fa-magnifying-glass" aria-label="Search OAC"></i></button>
</div>
</form>