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:

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>

You can add a little header inside the box to give the list a bit of context, and you can stylize the list itself so it uses the screen real-estate more efficiently:

<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.