I am using Dspace xmlui v 6.3.
I would like to modify the search results so that the name of the collection to which the item belongs appears in the preview.
I am using Mirage, although i might migrate to Mirage2 in the future. I understand that for both themes, the document I have to edit is discovery.xsl
, because by editing it I succesfully added the dc.format field to the preview.
Nevertheless, I don't know how to add the name of the collection. I tried by adding this piece of code from the DIM-Handler.xsl
, but it didn't work
<xsl:template name="collectionDetailList-DIM">
<xsl:variable name="data" select="./mets:dmdSec/mets:mdWrap/mets:xmlData/dim:dim"/>
<a href="{@OBJID}">
<xsl:choose>
<xsl:when test="string-length($data/dim:field[@element='title'][1]) > 0">
<xsl:value-of select="$data/dim:field[@element='title'][1]"/>
</xsl:when>
<xsl:otherwise>
<i18n:text>xmlui.dri2xhtml.METS-1.0.no-title</i18n:text>
</xsl:otherwise>
</xsl:choose>
</a>
<!--Display collection strengths (item counts) if they exist-->
<xsl:if test="string-length($data/dim:field[@element='format'][@qualifier='extent'][1]) > 0">
<xsl:text> [</xsl:text>
<xsl:value-of select="$data/dim:field[@element='format'][@qualifier='extent'][1]"/>
<xsl:text>]</xsl:text>
</xsl:if>
<br/>
<xsl:choose>
<xsl:when test="$data/dim:field[@element='description' and @qualifier='abstract']">
<xsl:copy-of select="$data/dim:field[@element='description' and @qualifier='abstract']/node()"/>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="$data/dim:field[@element='description'][1]/node()"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
Any help would be appreciated. Thank you very much.