Modify item metadata display (Manakin)
From DSpace Wiki
[edit] Files:
- [manakin-source]/themes/[theme-dir]/template.xsl (The theme's stylesheet)
- [manakin-source]/themes/dri2xhtml/DS-METS-1.0-DIM.xsl (DIM metadata handler)
[edit] Instructions:
- If you haven't already, you need to Create a new theme
- Locate the template named “itemSummaryView_DS-METS-1.0-DIM” inside the base DIM (DSpace Intermediate Metadata) handler. This is the template that is used to display an item when viewing it directly (another template is called when the user clicks show full item record).
<xsl:template name="itemSummaryView_DS-METS-1.0-DIM">. . . . </xsl:template> - Copy the template identified above into your theme's local template.xsl stylesheet. This will allow the theme to override the default behavior.
- To modify the copied template to add a new Dublin Core field, add the following table row inside the
<table class="ds-includeSet-table">element in the desired position. Here is an example:
<tr class="ds-table-row">
<td><span class="bold">''[Your label]'' :</span></td>
<td>
<xsl:copy-of select="
$data/dim:field[@element='[ dc element]' and
@qualifier='[dc qualifier]']/child::node()"
/>
</td>
</tr>
Or, if you would like to display a repeatable field with with ability to separate and format the repeated instances:
<tr class="ds-table-row">
<td><span class="bold">[Your label]:</span></td>
<td>
<xsl:for-each select="$data/dim:field[@element='[ dc element]' and @qualifier='[dc qualifier]']/child::node()">
<xsl:copy-of select="."/><br/>
</xsl:for-each>
</td>
</tr>
- To modify the copied template to remove a Dublin Core field, remove the (or comment out) the table row,
<tr>, containing the unwanted field.
[edit] Notes:
- If the dublin core field you are adding does not have a qualifier, such as dc.type, then replace “
@qualifier='[dc qualifier]'” with “not(@qualifier)” so that the rule does not match fields with a qualifier.
