DOAJ widgets
Simple search widget
Just copy and paste this on the page on which you want the widget to displayed.<script src="https://doaj.org/static/widget/simple_search.js" type="text/javascript"></script> <div id="doaj-simple-search-widget"></div>
Example:
Fixed query widget
This renders a set of results from the DOAJ based on a query fixed in JavaScript.
Copy and paste the following code on the page where you want the widget to displayed. The parameter QUERY_OPTIONS
takes a subset of
fields to define which results to retrieve. The example below example displays the journals containing the word 'medicine' in the title, in
alphabetical order. Configuration via these QUERY_OPTIONS
provides a simplified way to display results by keyword.
For more control over which results to display, we recommend configuring your query via the Search page - simply use the controls to find the results you want to show then click the share | embed button and copy the text provided in the box below 'embed this search' for inclusion on your page.
<script type="text/javascript"> !window.jQuery && document.write("<scr" + "ipt type=\"text/javascript\" src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js\"></scr" + "ipt>"); </script> <script type="text/javascript"> var doaj_url = "https://doaj.org"; var QUERY_OPTIONS = { query_string : 'medicine', // The plain-text query string query_field: 'bibjson.title', // The field we are querying sort_field: 'index.unpunctitle.exact', // Field to order results by sort_direction: 'asc', // Direction of sort "asc" | "desc" search_operator : 'AND', // Which sort operator to use "AND" | "OR" search_type: 'journal', // Which type to search upon (omit for both) "article" | "journal" page_size : 5, // How many results to show per widget page page_from : 0 // Which result to start from } </script> <script src="https://doaj.org/static/widget/fixed_query.js" type="text/javascript"></script> <div id="doaj-fixed-query-widget"></div>
Example:
The widget can resize nicely to fit within available horizontal space. Use the page_size
property to minimise its
vertical requirement by reducing the number of results per page.
Note: the vertical size can fluctuate slightly depending on what is being showed on each page.
You can only embed one fixed query widget per page. If you see strange artifacts in the results, try declaring your page encoding in
the <head>
, i.e. add: <meta charset="utf-8">
.
Configuring via QUERY_OPTIONS
There are a handful of options available, all are optional; omit them from QUERY_OPTIONS
for the default behaviour.
query_string | <plain text> - any text you might put in the search box |
query_field |
The field to query. Omit for any field, or specify one of these below bibjson.title - Title bibjson.keywords - Keywords index.classification- Subject index.issn.exact - ISSN bibjson.identifier.id - DOI index.country - Country of publisher index.language - Journal Language index.publisher - Publisher |
sort_field |
created_date - Date added to DOAJ (default) index.unpunctitle.exact - Title |
sort_direction |
asc - Ascending (default) desc - Descending |
search_operator |
AND - AND the terms in the query string. (default) OR - OR the terms in the query string. |
search_type |
The type of result to show. Omit this property to show results of both type journal - Only show journals article - Only show articles |
page_size | <integer> - how many results to show per page, 1+, (default 10) |
page_from | <integer> - which result to start from initially, 0+, (default 0) |