Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi all, I have this code
<xsl:if test="$currentPage/ancestor-or-self::*/@id = current()/@id"> <xsl:attribute name="class">current</xsl:attribute> </xsl:if> <xsl:attribute name="href"> <xsl:choose> <xsl:when test="count(./*[@isDoc]) > 1 and string(linkToSubpage) = '1'"> <xsl:value-of select="umbraco.library:NiceUrl(./*[@isDoc]/@id)" /> </xsl:when> <xsl:otherwise> <xsl:value-of select="umbraco.library:NiceUrl(@id)" /> </xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:value-of select="@nodeName"/>
i want also to add a property (textstring) with property alias "externalUrl" so that if this field is filled up...the link goes to that address.
I must add another xslt choose I think or added some conditions in the if : if test="string(./data [@alias = 'externalUrl') != ''">.
Dunno.
Any help please.
//Sam
Ok find it.
Added a choose statement : <xsl:when test="externalUrl !=''">
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Adding an external URL property to my site nav xslt
Hi all, I have this code
<xsl:if test="$currentPage/ancestor-or-self::*/@id = current()/@id">
<xsl:attribute name="class">current</xsl:attribute>
</xsl:if>
<xsl:attribute name="href">
<xsl:choose>
<xsl:when test="count(./*[@isDoc]) > 1 and string(linkToSubpage) = '1'">
<xsl:value-of select="umbraco.library:NiceUrl(./*[@isDoc]/@id)" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="umbraco.library:NiceUrl(@id)" />
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:value-of select="@nodeName"/>
i want also to add a property (textstring) with property alias "externalUrl" so that if this field is filled up...the link goes to that address.
I must add another xslt choose I think or added some conditions in the if : if test="string(./data [@alias = 'externalUrl') != ''">.
Dunno.
Any help please.
//Sam
Ok find it.
Added a choose statement : <xsl:when test="externalUrl !=''">
is working on a reply...