rwvaldivia
rwvaldivia

Reputation: 395

Dspace 6.x - Modifying/Showing the metadata displayed on Item page

After migrating from the Dspace 5.x version to the Dspace 6.x version, I'm having problems to show the metadata in the item-view screen with the XMLUI-Mirage2 theme.

In version 5.x and using JSPUI, the configuration was performed in dspace.cfg, using the property:

webui.itemdisplay.default = dc.title, dc.title.alternative, dc.contributor.author, dc.subject, dc.date.issued, dc.publisher, dc.identifier.citation, dc.relation.ispartofseries, dc.description.abstract, dc.description, dc.identifier.uri, dc.language.iso, dc.citation, dc.identifier

How to make this same change (show more metadata, in item view page) in Dspace 6.x version with XMLUI - Mirage2 theme?

Upvotes: 0

Views: 830

Answers (1)

euler
euler

Reputation: 1411

You have to create an XSL template first for each metadata that you would like to display in the simple item record. The file to edit is item-view.xsl found in [dspace]/webapps/xmlui/themes/Mirage2/xsl/aspect/artifactbrowser/.

For example, you like to display the ISBN if it is available, create an XSL template for ISBN:

    <xsl:template name="itemSummaryView-DIM-ISBN">
        <xsl:if test="dim:field[@element='identifier' and @qualifier='isbn' and descendant::text()]">
            <div class="col-sm-6 col-print-4">
                <div class="simple-item-view-isbn item-page-field-wrapper table">
                    <h5><i18n:text>xmlui.dri2xhtml.METS-1.0.item-isbn</i18n:text></h5>
                    <span>
                        <xsl:for-each select="dim:field[@element='identifier' and @qualifier='isbn']">
                            <xsl:copy-of select="./node()"/>
                            <xsl:if test="count(following-sibling::dim:field[@element='identifier' and @qualifier='isbn']) != 0">
                                <xsl:text>; </xsl:text>
                            </xsl:if>
                        </xsl:for-each>
                    </span>
                </div>
            </div>
        </xsl:if>
    </xsl:template>

Then call this template in the portion that you would like to appear, in the example below I would like it to display under the Abstract field:

<div class="col-sm-8">
    <xsl:call-template name="itemSummaryView-DIM-abstract"/>
    <xsl:call-template name="itemSummaryView-DIM-ISSBN"/>
... Rest of other templates ...

Please note that if you don't have the i18n message for ISBN, you can just write <h5>ISBN</h5> instead of <i18n:text>xmlui.dri2xhtml.METS-1.0.item-isbn</i18n:text> but I suggest to update the i18n messages for non-existing labels.

Upvotes: 1

Related Questions