【问题标题】:Add link in author label - DSpace 6.2在作者标签中添加链接 - DSpace 6.2
【发布时间】:2018-04-06 21:36:55
【问题描述】:

我正在尝试编辑 item-view.xsl 以在作者标签 (dc.contributor.author) 中添加链接,但还没有成功。

我正在使用 XMLUI - Mirage2

Author link example image

输入:https://openknowledge.worldbank.org/handle/10986/29498

我应该添加什么?

谢谢

【问题讨论】:

  • 您正在运行哪个 DSpace UI(XMLUI 或 JSPUI)?如果您正在运行 XMLUI,您使用的是哪个主题?你运行的是什么版本的 DSpace?
  • 嗨@terrywb。我正在使用 XMLUI - Mirage2

标签: xslt dspace


【解决方案1】:

以下代码 sn-p 可能会有所帮助。此代码将主题字段转换为构面链接。它需要稍作修改才能适用于作者字段。

<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>

【讨论】:

  • 谢谢特里wb。这对我有帮助。
  • 我有一个问题。我在哪里可以找到这个 xml 来编辑它? (在 dspace 文件夹结构中。)谢谢。我想添加一个可点击的 DOI 链接。
猜你喜欢
  • 1970-01-01
  • 2016-09-16
  • 2017-06-16
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-09-28
相关资源
最近更新 更多