Last active
August 29, 2015 14:03
-
-
Save terrywbrady/2bd83490464f434ebcb4 to your computer and use it in GitHub Desktop.
Override XMLUI Home Breadcrumb Link
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:template match="dri:trail"> | |
<li> | |
<xsl:attribute name="class"> | |
<xsl:text>ds-trail-link </xsl:text> | |
<xsl:if test="position()=1"> | |
<xsl:text>first-link </xsl:text> | |
</xsl:if> | |
<xsl:if test="position()=last()"> | |
<xsl:text>last-link</xsl:text> | |
</xsl:if> | |
</xsl:attribute> | |
<!-- Determine whether we are dealing with a link or plain text trail link --> | |
<xsl:choose> | |
<!-- Insert the <xsl:when> to change the URL for "HOME" in the breadcrumb --> | |
<xsl:when test="./@target = concat($context-path,'/')"> | |
<a> | |
<xsl:attribute name="href"> | |
<xsl:text>http://www.library.georgetown.edu/digitalgeorgetown</xsl:text> | |
</xsl:attribute> | |
<xsl:apply-templates /> | |
</a> | |
</xsl:when> | |
<xsl:when test="./@target"> | |
<a> | |
<xsl:attribute name="href"> | |
<xsl:value-of select="./@target"/> | |
</xsl:attribute> | |
<xsl:apply-templates /> | |
</a> | |
</xsl:when> | |
<xsl:otherwise> | |
<xsl:apply-templates /> | |
</xsl:otherwise> | |
</xsl:choose> | |
</li> | |
</xsl:template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment