This is an old revision of the document!
Table of Contents
Linking to VuFind from External Systems
Generic "Canned" Links
It is often useful to have link templates that allow other systems (such as resource sharing environments, third-party databases, etc.) to link to content within your VuFind instance. Fortunately, VuFind URLs are structured in a way that makes this fairly simple.
Records
All record links should be of the form http://[your-vufind-server]/[your-vufind-path]/Record/[record-id]. For example, http://vufind.org/demo/Record/12345.
Searches
All search links should be of the form http://[your-vufind-server]/[your-vufind-path]/Search/Results?type=[search-type]&lookfor=[query]. For example, http://vufind.org/demo/Search/Results?type=Author&lookfor=Smith,+John.
Valid values for [search-type] may be found by consulting your searchspecs.yaml configuration file – or, for a simpler approach, just perform a search of the type you desire and copy and paste the resulting URL.
Search Widgets
You can easily perform a VuFind search from a third-party site by simply copying the search form HTML generated by VuFind. Just follow these steps:
1.) Go to your VuFind home page and view the source in your browser.
2.) Copy the form containing the search box. It should look something like this:
<form method="get" action="/demo/Search/Results" name="searchForm" id="searchForm" class="search"> <label for="searchForm_lookfor" class="offscreen">Your search terms</label> <input id="searchForm_lookfor" type="text" name="lookfor" size="40" value="" class="autocomplete searcher:Solr typeSelector:searchForm_type"/> <label for="searchForm_type" class="offscreen">Search Type</label> <select id="searchForm_type" name="type" data-native-menu="false"> <option value="AllFields">All Fields</option> <option value="Title">Title</option> <option value="Author">Author</option> <option value="Subject">Subject</option> <option value="CallNumber">Call Number</option> <option value="ISN">ISBN/ISSN</option> <option value="tag">Tag</option> </select> <input type="submit" name="submit" value="Find"/> <a href="/demo/Search/Advanced" class="small">Advanced</a> </form>
3.) Change the action attribute of the <form> tag to include the full URL of your VuFind instance (e.g. in the example above, add http://vufind.org to the front of the action).
You can add hidden input elements to the form if you wish to pre-set filters, force a particular search type, etc.