Copied to clipboard

Flag this post as spam?

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


  • Ilya Golets 2 posts 82 karma points
    Aug 23, 2021 @ 14:24
    Ilya Golets
    0

    ContentPicker2 and XSLT

    Hi,

    I am using ContentPicker that is currently deprecated. My XSLT is using umbraco.library:NiceUrl to get URL for a node property.

    In order to migrate to new ContentPicker2 I've changes property editor, selected a referenced node and published. Now My XSLT throws an error "OverflowException: Value was either too large or too small for an Int32."

    When I output a property value I see values like umb://document/0ffcfa8002c6453d90383c41ebf509ba instead of an int ID.

    What should I use in XSLT it order to get URL for umb:// references?

    Below is a block of XSLT code tha I'm using now

    <xsl:for-each select="$startnode/TMBlock[@isDoc]">
    <xsl:if test="(position()&lt;4)">
        <div>
            <xsl:attribute name="class"><xsl:value-of select="./blockClass"/></xsl:attribute>
            <h3><xsl:value-of select="./blockHeader"/></h3>
            <span><xsl:value-of select="./blockContent"/></span>
            <a href="{umbraco.library:NiceUrl(./blockLink)}">
                <img src="/images/more.gif" alt="" width="70" height="17" />
            </a>
        </div>
    </xsl:if>
    

Please Sign in or register to post replies

Write your reply to:

Draft