Add to the API Call's URLCustomize the CSSExpandable/Collapsible Subject MenuAdd Stripes to Rows
This is the "Multiple API Calls (Same Type)" page of the "Widgets & API Utility in LibGuides & LibGuides CMS (v1)" guide.
Alternate Page for Screenreader Users
Skip to Page Navigation
Skip to Page Content

This group's documentation site is shut down.

As of 12pm EST on February 28, 2018, all LibGuides sites will be using v2.

See our v2 documentation for more on how to use LibGuides v2.

Widgets & API Utility in LibGuides & LibGuides CMS (v1)  

Learn more about widgets and API calls available in LibGuides & LibGuides CMS.
Last Updated: Mar 21, 2015 URL: Print Guide RSS UpdatesEmail Alerts

Multiple API Calls (Same Type) Print Page

Adding Multiple Calls for the Same API Type to One Page

You can include multiple LibGuides API calls on one page, but you need to change a couple of things:

  • update the id in the div (at the beginning of the Javascript code), and
  • add a parameter to each JavaScript querystring.

Adjusting the div basically means changing the id='api_search_category_iid1' (where 1 is your iid) to something a little different, like api_search_category_iid1a.

Each ID must be unique, so adding the a (or b, c, d, etc.) at the end is an easy way to make it unique.

Then add the parameter to the end of the querystring. You'll need to use the same id you used in the div at the end of this: &id_override=modified div id here.

Here's an example using subjects from the SpringyLib LibGuides site (changes are in bold):

This is the first API call added to the page:

<div id='api_search_category_iid1714'></div><script type='text/javascript' src=''> </script>

This is the second:

<div id='api_search_category_iid1714a'></div><script type='text/javascript' src='
&format=js&id_override=api_search_category_iid1714a'> </script>

This is the third:

<div id='api_search_category_iid1714b'></div><script type='text/javascript' src='
&format=js&id_override=api_search_category_iid1714b'> </script>

And you'd keep going from there!



Here they are in action:

The first call:

The second call:

The third call:


Loading  Loading...