Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Martin 278 posts 662 karma points
    Dec 07, 2012 @ 10:42
    Martin
    0

    uComponents URL Picker - Hide When Empty

    Hi,

    I have setup the url picker for hand typed url and content picker, but im having trouble hiding the a tag when no url is entered.

    Any help would be grateful.

    <xsl:variable name="url" select="./url/url-picker"/>
    <xsl:if test="$url/@mode !=''">
    <a class="button buy" >
    <xsl:attribute name="href">
    <xsl:choose>

    <xsl:when test="$url/@mode = 'URL'">
    <xsl:text>http://</xsl:text><xsl:value-of select="$url/url"/>
    </xsl:when>

    <xsl:when test="$url/@mode = 'Content'">
    <xsl:value-of select="umbraco.library:NiceUrl($url/node-id)"/>
    </xsl:when>

    </xsl:choose>
    </xsl:attribute>
    <xsl:text>Buy Now</xsl:text>
    </a>
    </xsl:if>

     

     

Please Sign in or register to post replies

Write your reply to:

Draft