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í
m
m
 
(Nejsou zobrazeny 4 mezilehlé verze od 2 dalších uživatelů.)
Řádek 1: Řádek 1:
 
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ě.
 
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:'''
+
'''1) Do hlavičky <head> stránky vložte následující skript:'''
  
<pre><!-- Script that converts the query string into valid parameter -->
+
<pre>
 
<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;
document.forms["searchForm"].submit();
+
    document.forms["searchForm"].submit();
 
}
 
}
</script></pre>
+
</script>
 +
</pre>
  
'''2) Do těla stránky vložte následující formulář:'''
+
'''2a) Do těla <body> stránky vložte následující formulář pro český web:'''
  
<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()">
+
<pre>
<!-- Customizable Parameters -->
+
<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()">
<input type="hidden" name="vid" value="420CKIS_INST:CKIS">
+
    <input type="hidden" name="vid" value="420CKIS_INST:UKAZ">
<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="query" id="primoQuery">
<!-- Fixed parameters -->
+
    <input type="text" id="primoQueryTemp" value="" size="35">
<input type="hidden" name="query" id="primoQuery">
+
    <input id="go" title="Centrální vyhledavač UKAŽ" onclick="searchPrimo()" type="button" value="Hledat" alt="Hledat v Centrálním vyhledavači UKAŽ" style="height: 22px; font-size: 12px; font-weight: bold; background: #D22D40; color: #ffffff; border: 1px solid;">
<input type="hidden" name="pcAvailabiltyMode" value="true">
+
</form>
<input type="text" id="primoQueryTemp" value="" size="35">
+
</pre>
<!-- 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></pre>
 
  
 +
'''2b) Do těla <body> stránky vložte následující formulář pro anglický web:'''
 +
 +
<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()">
 +
    <input type="hidden" name="vid" value="420CKIS_INST:UKAZ">
 +
    <input type="hidden" name="tab" value="Everything">
 +
    <input type="hidden" name="search_scope" value="MyInst_and_CI">
 +
    <input type="hidden" name="lang" value="en">
 +
    <input type="hidden" name="query" id="primoQuery">
 +
    <input type="text" id="primoQueryTemp" value="" size="35">
 +
    <input id="go" title="Charles University’s discovery service UKAŽ" onclick="searchPrimo()" type="button" value="Search" alt="Search" style="height: 22px; font-size: 12px; font-weight: bold; background: #D22D40; color: #ffffff; border: 1px solid;">
 +
</form>
 +
</pre>
  
 
'''Oficiální dokumentace''': [https://knowledge.exlibrisgroup.com/Primo/Product_Documentation/020Primo_VE/Primo_VE_(English)/030Primo_VE_User_Interface/010Primo_VE_Customization_-_Best_Practices#Creating_a_Search_Box_With_Deep_Links_to_Primo_VE ExLibris Knowledge Center]
 
'''Oficiální dokumentace''': [https://knowledge.exlibrisgroup.com/Primo/Product_Documentation/020Primo_VE/Primo_VE_(English)/030Primo_VE_User_Interface/010Primo_VE_Customization_-_Best_Practices#Creating_a_Search_Box_With_Deep_Links_to_Primo_VE ExLibris Knowledge Center]
 +
 +
[[Category:Discovery]]

Aktuální verze z 22. 2. 2024, 13:37

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 <head> stránky vložte následující skript:

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

2a) Do těla <body> stránky vložte následující formulář pro český web:

<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()">
    <input type="hidden" name="vid" value="420CKIS_INST:UKAZ">
    <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="query" id="primoQuery">
    <input type="text" id="primoQueryTemp" value="" size="35">
    <input id="go" title="Centrální vyhledavač UKAŽ" onclick="searchPrimo()" type="button" value="Hledat" alt="Hledat v Centrálním vyhledavači UKAŽ" style="height: 22px; font-size: 12px; font-weight: bold; background: #D22D40; color: #ffffff; border: 1px solid;">
</form>

2b) Do těla <body> stránky vložte následující formulář pro anglický web:

<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()">
    <input type="hidden" name="vid" value="420CKIS_INST:UKAZ">
    <input type="hidden" name="tab" value="Everything">
    <input type="hidden" name="search_scope" value="MyInst_and_CI">
    <input type="hidden" name="lang" value="en">
    <input type="hidden" name="query" id="primoQuery">
    <input type="text" id="primoQueryTemp" value="" size="35">
    <input id="go" title="Charles University’s discovery service UKAŽ" onclick="searchPrimo()" type="button" value="Search" alt="Search" style="height: 22px; font-size: 12px; font-weight: bold; background: #D22D40; color: #ffffff; border: 1px solid;">
</form>

Oficiální dokumentace: ExLibris Knowledge Center