Copied to clipboard

Flag this post as spam?

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


  • Ashok Raja 12 posts 32 karma points
    Oct 14, 2010 @ 12:04
    Ashok Raja
    0

    apply-templates issue with Umbraco 4.5.2

          Changed the 4.0.3 schema from

       <xsl:apply-templates select="$offerPanelRoot/node" mode="offerPanels"/>

    and the template used is

        <xsl:template match="node" mode="offerPanels">

    to   4.5.2 

         <xsl:apply-templates select="$offerPanelRoot/*[@isDoc]" mode="offerPanels"/>
        <xsl:template match="node" mode="offerPanels">

    But the matching template is not called. Even tried match="*[@isDoc]" but no joy.

    What am I doing wrong? Please advice.

  • Ashok Raja 12 posts 32 karma points
    Oct 14, 2010 @ 13:03
    Ashok Raja
    0

    Just tried to match everything (match="*") and seems to call the template now.

    But the other problem I have is when testing a condition

        <xsl:template mode="CollectionItem" match="*[@isDoc]">

            <xsl:choose>

               <xsl:when test="../../@nodeTypeAlias='OfferPanel'">

    Earlier we use to test against @nodeTypeAlias. Not sure what to use for the new schema.

  • Dirk De Grave 4537 posts 6006 karma points MVP 3x admin c-trib
    Oct 14, 2010 @ 13:33
    Dirk De Grave
    0

    Ashok,

     

    Use name(../..) = 'OfferPanel'

     

    Cheers,

    /Dirk

  • Ashok Raja 12 posts 32 karma points
    Oct 14, 2010 @ 13:36
    Ashok Raja
    0

    Great! Has worked.

    Thanks again.

  • 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