Skip to Questions

Guide FAQ - Your LibGuides v1 Questions. Answered!

Q

Can you prevent a specific subject category (with associated items) from showing up on the subject list?

I want subject guides and course guides to display separately on the home page of my website (we want to have a home page similar to VCU's with tabs and using the API). I'm wondering though if I can create a subject category for Course Guides and not have it show up in the list of subjects but show up elsewhere, or if there's another way to separate course from subject guides.
Last Updated: Mar 08, 2013  |  733 Views

Was this helpful? 0   0
A

Answer

Absolutely! You just need to modify the API URL slightly.

Add: &exclude_ids=1,2,3,4,5
Where 1,2,3,4,5 are the IDs of the subject categories you want to exclude.

For example, if I wanted to exclude the "CampusGuides" subject category from the Help site's subject API, the API URL might look like this (if I'm using the JavaScript embed code):

http://api.libguides.com/api_subjects.php?iid=432&break=menu&guides=true&context=object&format=js&exclude_ids=49514

That produces this list:

Finding category IDs: Go to http://yourlibguidessite/cat.php and click on a category; note the cid in the URL.

Have you assigned a friendly URL to a category? Never fear! Just remove that, look at the URL, jot down the ID, and add it back.

Answered by Sarah PawlekBookmark and Share

Other Answers / Comments (1)

  1. Thank you so much, Sarah! This is exactly what I was hoping was possible.
    by Meredith on Jul 07, 2011.

Need Help?

This site is shutting down by, if not before, March 31, 2018.

LibGuides v1 servers are also shutting down at that time.

See LibGuides v2 documentation instead.


Support:

Follow LibGuidesFAQ on Twitter Follow us on Twitter!