Reputation: 891
I've added a textstring property "externalURL" to my Doctype. I want to enter in the external URL in the textstring and for that link to redirect to the external URL when that link is clicked within the nav.
However the following isn't working:
<a>
<xsl:attribute name="href">
<xsl:choose>
<xsl:when test="string(externalUrl) != ''">
<xsl:value-of select="externalUrl" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="umbraco.library:NiceUrl(@id)" />
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:if test="descendant-or-self::*[@id = $currentPage/@id]">
<xsl:attribute name="class">current</xsl:attribute>
</xsl:if>
<xsl:value-of select="@nodeName" />
</a>
Can anybody help with this?
Upvotes: 0
Views: 1778
Reputation: 891
A simple matter of case sensitivity. I needed to change "externalUrl" to "externalURL" to match my property type. Sometimes it's the most obvious things.
Upvotes: 1