Webmasters and syndicating MyLibrary content
With the addition of some simple HTML code, you can incorporate MyLibrary content into plain o' HTML pages. For example, include something like following snippet and an unordered hotlinked list of content from MyLibrary will appear on the page.
<script type = 'text/javascript'
src = 'http://yourhost/mylibrary/js/?termid=37'>
</script>
Read on for details.
MyLibrary terms
The content of MyLibrary is organized using sets of "terms". These terms bring similar information resources together under a single heading. Example terms might include dictionaries, newspapers, literature, etc.
Each term is associated with a number -- a termid. By substituting a different value for termid, in red above, you are able to insert different sets of information resources into your page(s). Here is a list of all the terms presently in this system, a brief description of each term, and its associated termid:
- Agriculture and Food Sciences - This term comes from the DOAJ. (termid=4)
- Arts and Architecture - This term comes from the DOAJ. (termid=5)
- Biology and Life Sciences - This term comes from the DOAJ. (termid=6)
- Business and Economics - This term comes from the DOAJ. (termid=7)
- Chemistry - This term comes from the DOAJ. (termid=8)
- Earth and Environmental Sciences - This term comes from the DOAJ. (termid=9)
- General Works - This term comes from the DOAJ. (termid=10)
- Health Sciences - This term comes from the DOAJ. (termid=11)
- History and Archaeology - This term comes from the DOAJ. (termid=12)
- Journals - These are scholarly serial publications. (termid=22)
- Languages and Literatures - This term comes from the DOAJ. (termid=13)
- Law and Political Science - This term comes from the DOAJ. (termid=14)
- Mathematics and Statistics - This term comes from the DOAJ. (termid=15)
- Philosophy and Religion - This term comes from the DOAJ. (termid=16)
- Physics and Astronomy - This term comes from the DOAJ. (termid=17)
- Science General - This term comes from the DOAJ. (termid=18)
- Social Sciences - This term comes from the DOAJ. (termid=19)
- Technology and Engineering - This term comes from the DOAJ. (termid=20)
Therefore, the following HTML snippet will include a list of resources about Edgar Allan Poe (termid=18) into your page.
<script type = 'text/javascript'
src = 'http://dewey.library.nd.edu/mylibrary/demos/user/js/?termid=18'>
</script>
Likewise, this snippet will include a list of bibliographies (termid=21).
<script type = 'text/javascript'
src = 'http://dewey.library.nd.edu/mylibrary/demo/user/js/?termid=21'>
</script>
To see this in action load js-example-01.html, and view the source code. Not too difficult.
Styling your lists
By adding div elements and style attributes to your HTML, you can style the lists and position them on the page. For example, this snippet will create a list of literature resources on the right-hand side of the page and enclose it in a box:
<div style='float: right;
padding-left: 1em;
padding-right: 1em;
width: 15%;
font-size: small;
border: 1px solid #778;
margin: 1em;'>
<script type = 'text/javascript'
src = 'http://dewey.library.nd.edu/mylibrary/demos/user/js/?termid=21'>
</script>
</div>
<div style='float: right;
padding-left: 1em;
padding-right: 1em;
width: 15%;
font-size: small;
border: 1px solid #778;
margin: 1em;'>
<h3>Biographies</h3>
<div style='margin-left: -2em'>
<script type = 'text/javascript'
src = 'http://dewey.library.nd.edu/mylibrary/demos/user/js/?termid=22'>
</script>
</div>
</div>
To see how this is rendered, view the source of js-example-02.html.
Using something like the snippet above is the recommended practice since it seems to be pretty efficient and unobtrusive.
That's all. Have fun with it.