Universal Viewer is a community-developed, IIIF-based viewer that has similar functionality to Mirador. Any IIIF content can be loaded and displayed in Universal Viewer. This recipe uses version 4 of Universal Viewer and integrates it into CONTENTdm in the same way as the other IIIF-based viewer recipes.
The design of this recipe is simpler than the Mirador recipe because it loads the Universal Viewer application from a public content delivery network called jsDelivr rather than serving it directly from CONTENTdm. The files used in this recipe can be viewed and downloaded from the CONTENTdm Cookbook download portal under the Universal Viewer section.
There are two pieces needed to integrate Universal Viewer. The overall process looks like this:
- Create an empty custom page, which serves as the container for Universal Viewer.
Step 1: Create the custom page container
The basis for this recipe will be a standard Custom Page which will be the container for Universal Viewer (see Create a custom page for more information). This HTML page has inline CSS styling to clear all margins and padding.
Download the uv.html custom page file for this integration. You can modify this HTML file as you see fit. For example, if you would like to display a different page title when Universal Viewer loads, edit the title in the YAML header at the top of the HTML code.
Step 2: Add the custom JS file
- Inserts a Universal Viewer button on the item page of any records that have IIIF API support, and
- Loads Universal Viewer and renders it into the custom page container with the IIIF Manifest of the item.
After you have uploaded uv-cp.js, Save and Publish in the Website Configuration Tool to complete the installation of the recipe.