Alejandro
Alejandro

Reputation: 25

Add link in author label - DSpace 6.2

I've trying to edit item-view.xsl to add a link in author label (dc.contributor.author) but no luck yet.

I'm using XMLUI - Mirage2

Author link example image

in: https://openknowledge.worldbank.org/handle/10986/29498

What should I add?

Thanks

Upvotes: 1

Views: 400

Answers (1)

terrywb
terrywb

Reputation: 3956

The following code snippet might help. This code turns the subject field into a facet link. It will require a little modification to work for the author field.

<xsl:variable name="H_SUBJECT">Subject</xsl:variable>
<xsl:variable name="DFILTER_SUBJECT">/discover?filtertype=subject&amp;filter_relational_operator=equals&amp;filter=</xsl:variable>

<xsl:template name="itemSummaryView-DIM-subject">
    <xsl:if test="dim:field[@element='subject']">
        <div class="simple-item-view-description item-page-field-wrapper table">
            <h5><xsl:value-of select="$H_SUBJECT"/></h5>
            <div>
                <xsl:for-each select="dim:field[@element='subject']">
                    <xsl:choose>
                        <xsl:when test="node()">
                            <a class="gu-subject-link" href="{concat($FILTER_SUBJECT,.)}">
                                <span>
                                    <xsl:apply-templates select="." mode="microtag-prop"/>
                                    <xsl:apply-templates select="text()"/>
                                </span>
                            </a>
                        </xsl:when>
                        <xsl:otherwise>
                            <xsl:text>&#160;</xsl:text>
                        </xsl:otherwise>
                    </xsl:choose>
                    <xsl:if test="count(following-sibling::dim:field[@element='subject']) != 0">
                        <xsl:text>; </xsl:text>
                    </xsl:if>
                </xsl:for-each>
                <xsl:if test="count(dim:field[@element='subject']) &gt; 1">
                    <xsl:text>; </xsl:text>
                </xsl:if>
            </div>
        </div>
    </xsl:if>
</xsl:template>

Upvotes: 1

Related Questions