CSU Library Website Customization

Documentation of CSU Primo and LibGuides customization

Display DSpace Thumbnails in Primo

Goal

Original Code from Lincoln University

First you need to get them into your DSpace OAI feed. Assuming XMLUI, you’ll want your oai_dc.xsl file to include something like:

<xsl:for-each select="doc:metadata/doc:element[@name='bundles']/doc:element[@name='bundle']">

<xsl:if test="doc:field[@name='name']/text() = 'THUMBNAIL'">

<dc:relation>https://<xsl:value-of select="substring-after(doc:element[@name='bitstreams']/doc:element[@name='bitstream']/doc:field[@name='url']/text(), 'http://')" />

 </dc:relation>

</xsl:if>

</xsl:for-each>

 

(Note this will always select the first thumbnail, regardless of whether it has Anon READ permissions associated with it. If it doesn’t, then it won’t actually display on Primo – that’s why some of our results still don’t have a thumbnail. We’re working on a fix for that but it’s more complicated, involving the Java code.)

 

Then in Primo Back Office you need to add a links:thumbnail norm rule based on the dc:relation field. We’ve included a “Check that string exists” for “/bitstream/10182/” (10182 is our handle prefix so if that’s in the url we know it’s our site) to make sure this only pulls in dc:relation values that are thumbnails rather than other resources.

CSU Customization

DSpace Change

Daniel Hamp added the following code to the OAI XML for DSpace

Primo Back Office Change

Primo Home > Advanced Configuration > Full Normalization Rule Configuration > 01CSLSU_DSPACE > links:thumbnail > Create New

 

 

 

URL: https://libguides.colostate.edu/web_customization | Print Page