Vložení vyhledávacího widgetu na web knihovny: Porovnání verzí

Z Alma WiKi
Skočit na navigaci Skočit na vyhledávání
(vytvoreni stranky, vlozeni zakladniho navodu)
 
m
Řádek 3: Řádek 3:
 
'''1) Do hlavičky stránky vložte následující skript:'''
 
'''1) Do hlavičky stránky vložte následující skript:'''
  
''<!-- Script that converts the query string into valid parameter -->
+
<pre><!-- Script that converts the query string into valid parameter -->
 
 
 
<script type="text/javascript">
 
<script type="text/javascript">
 
 
function searchPrimo() {
 
function searchPrimo() {
 
 
document.getElementById("primoQuery").value = "any,contains," + document.getElementById("primoQueryTemp").value.replace(/[,]/g, " ");
 
document.getElementById("primoQuery").value = "any,contains," + document.getElementById("primoQueryTemp").value.replace(/[,]/g, " ");
 
 
document.forms["searchForm"].submit();
 
document.forms["searchForm"].submit();
 
 
}
 
}
 
+
</script></pre>
</script>''
 
  
 
'''2) Do těla stránky vložte následující formulář:'''
 
'''2) Do těla stránky vložte následující formulář:'''
  
''<form id="simple" name="searchForm" method="get" target="_self" action="https://cuni.primo.exlibrisgroup.com/discovery/search" enctype="application/x-www-form-urlencoded; charset=utf-8" onsubmit="searchPrimo()">
+
<pre><form id="simple" name="searchForm" method="get" target="_self" action="https://cuni.primo.exlibrisgroup.com/discovery/search" enctype="application/x-www-form-urlencoded; charset=utf-8" onsubmit="searchPrimo()">
 
 
 
<!-- Customizable Parameters -->
 
<!-- Customizable Parameters -->
 
 
<input type="hidden" name="vid" value="420CKIS_INST:CKIS">
 
<input type="hidden" name="vid" value="420CKIS_INST:CKIS">
 
 
<input type="hidden" name="tab" value="Everything">
 
<input type="hidden" name="tab" value="Everything">
 
 
<input type="hidden" name="search_scope" value="MyInst_and_CI">
 
<input type="hidden" name="search_scope" value="MyInst_and_CI">
 
 
<input type="hidden" name="lang" value="cs">
 
<input type="hidden" name="lang" value="cs">
 
 
<input type="hidden" name="mode" value="basic">
 
<input type="hidden" name="mode" value="basic">
 
 
<!-- Fixed parameters -->
 
<!-- Fixed parameters -->
 
 
<input type="hidden" name="query" id="primoQuery">
 
<input type="hidden" name="query" id="primoQuery">
 
 
<input type="hidden" name="pcAvailabiltyMode" value="true">
 
<input type="hidden" name="pcAvailabiltyMode" value="true">
 
 
<input type="text" id="primoQueryTemp" value="" size="35">
 
<input type="text" id="primoQueryTemp" value="" size="35">
 
 
<!-- Search Button -->
 
<!-- Search Button -->
 
 
<input id="go" title="Hledat" onclick="searchPrimo()" type="button" value="Hledat" alt="Hledat" style="height: 22px; font-size: 12px; font-weight: bold; background: #D22D40; color: #ffffff; border: 1px solid;">
 
<input id="go" title="Hledat" onclick="searchPrimo()" type="button" value="Hledat" alt="Hledat" style="height: 22px; font-size: 12px; font-weight: bold; background: #D22D40; color: #ffffff; border: 1px solid;">
</form>''
+
</form></pre>
  
  
 
'''Oficiální dokumentace''': ExLibris Knowledge Center
 
'''Oficiální dokumentace''': ExLibris Knowledge Center

Verze z 31. 5. 2021, 12:07

Pokud chcete do stránek knihovny vložit vyhledávací widget, který umožní uživatelům zadat dotaz a odvést je na výsledky v UKAŽ, postupujte následovně.

1) Do hlavičky stránky vložte následující skript:

<!-- 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>

2) Do těla stránky vložte následující formulář:

<form id="simple" name="searchForm" method="get" target="_self" action="https://cuni.primo.exlibrisgroup.com/discovery/search" enctype="application/x-www-form-urlencoded; charset=utf-8" onsubmit="searchPrimo()">
<!-- Customizable Parameters -->
<input type="hidden" name="vid" value="420CKIS_INST:CKIS">
<input type="hidden" name="tab" value="Everything">
<input type="hidden" name="search_scope" value="MyInst_and_CI">
<input type="hidden" name="lang" value="cs">
<input type="hidden" name="mode" value="basic">
<!-- Fixed parameters -->
<input type="hidden" name="query" id="primoQuery">
<input type="hidden" name="pcAvailabiltyMode" value="true">
<input type="text" id="primoQueryTemp" value="" size="35">
<!-- Search Button -->
<input id="go" title="Hledat" onclick="searchPrimo()" type="button" value="Hledat" alt="Hledat" style="height: 22px; font-size: 12px; font-weight: bold; background: #D22D40; color: #ffffff; border: 1px solid;">
</form>


Oficiální dokumentace: ExLibris Knowledge Center