===== 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. === Complex Searches === More complicated searches can be constructed by specifying arrays of lookfor/type/bool parameters with numbered groups: lookfor[]= array of search terms in group N\\ type[]= array of search fields in group N\\ bool[]= boolean operator used by group N (AND/OR/NOT) Additionally a top level operator can be specified between groups using the join parameter: join= (AND/OR) Thus a search like "(title:foo OR author:bar) AND (NOT subject:baz)" can be represented as: http://[your-vufind-server]/[your-vufind-path]/Search/Results?join=AND&lookfor0[]=foo&type0[]=title&lookfor0[]=bar&type0[]=author&bool0[]=OR&lookfor1[]=baz&type1[]=subject&bool1[]=NOT The [] syntax allows the repeated parameters to be amassed together, by group number. The square brackets ([]) may be encoded in the URL's query string as %5B%5D. ==== 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: 3.) Change the action attribute of the
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.