Copied to clipboard

Flag this post as spam?

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


  • İdris 34 posts 184 karma points
    Jul 10, 2013 @ 13:11
    İdris
    0

    Error Parsing XSLT

    ....

    <xsl:variable name="source" select="/macro/source"/>

     

    <xsl:template match="/">

    <div style='width:990px'>

    <div id='coin-slider' class='coin-slider'>

    <xsl:for-each select="umbraco.library:GetXmlNodeById($source)/* [@isDoc]">  

     <a href="{umbraco.library:NiceUrl(targetPage)}" >

        <img><xsl:attribute name="src"><xsl:value-of select="imageFile"/></xsl:attribute></img>

        <span><xsl:value-of select="@nodeName"/></span></a>

    ...

    When I put targetPage I got the error. With $sorce works but I can not change the link. I use codes belongs to lower version of Umbraco.  

  • Sebastian Dammark 583 posts 1407 karma points
    Jul 10, 2013 @ 18:38
    Sebastian Dammark
    1

    What does targetPage contain ?

    Maybe you could try something like this

    <xsl:for-each select="umbraco.library:GetXmlNodeById($source)/* [@isDoc]">
        <xsl:apply-templates select="targetPage[normalize-space()]" />
    </xsl:for-each>
    
    <xsl:template match="targetPage">
        <a href="{umbraco.library:NiceUrl(.)}">
        <img src="{../imageFile}" />
            <span><xsl:value-of select="../@nodeName"/></span>
        </a>
    </xsl:template>

    Then you will only get the A-tag when targetPage contains any data ...

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies