How do I embed the Knowledge and Library Hub search box in my local library website / Sharepoint using iframes?
This technique will place a frame in your webpage displaying the Knowledge and Library Hub (KLH) website. Users will search the KLH while remaining on your website. It can also be used to create a Webpart for a Sharepoint site
(An alternative approach is to insert a piece of code developed by EBSCO which puts a mini search box on your page. This technique is described in the article Embedding the Knowledge and Library Hub search box in your local library website.)
This is the iframe URL version of the KLH search box:
<iframe src="https://gssapps.ebscohost.com/hee/searchboxes/nhs.php?custid=XXXXX&authtype=guest" width="780" height="350"></iframe>
Before embedding this into your library website, you will need to update the iframe URL to point to your trust’s specific KLH instance by replacing the XXXXX after custid= (see highlighted above) with your trust’s EBSCO Customer ID. You can find your Customer ID in the article What's my local instance?.
This is an example of an iframe URL with an EBSCO Customer ID added for reference:
<iframe src="https://gssapps.ebscohost.com/hee/searchboxes/nhs.php?custid=ns221502&authtype=guest" width="780" height="350"></iframe>
This is the iframe URL version of the KLH search box in a compact form used for a SharePoint webpart:
The following code was used to create a web part for SharePoint and gives a compact search box and shows how you can tweak the code to achieve a form that suits.
<iframe border="0" frameBorder="0" src="https://gssapps.ebscohost.com/hee/searchboxes/nhs.php?custid=XXXXXauthtype=guest" width="220" height="227" border="0"></iframe>
Before embedding this into your library website, you will need to update the iframe URL to point to your trust’s specific KLH instance by replacing the XXXXX after custid= (see highlighted above) with your trust’s EBSCO Customer ID. You can find your Customer ID in the article What's my local instance?.
To change the search box authentication method:
The iframe URLs above are set up to authenticate users via guest access (more information on this can be found here: https://connect.ebsco.com/s/article/What-is-guest-access-and-how-do-I-configure-it-for-users )
If you would prefer your users to be prompted to login with OpenAthens before accessing the Knowledge and Library Hub, you can update the authentication method to “authtype=shib” instead of “authtype=guest” :
<iframe src="https://gssapps.ebscohost.com/hee/searchboxes/nhs.php?custid=XXXXX&authtype=shib" width="780" height="350"></iframe>