Copied to clipboard

Flag this post as spam?

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


  • Martin Vingaard 39 posts 60 karma points
    Sep 07, 2011 @ 08:21
    Martin Vingaard
    0

    Cant <xsl:Choose more than one image

    I'm trying to acces diferent pictures ragarding the document type of the child.
    I got it to work with accesing nodeName and listing those. Bold for one and italic for another.

    Now im trying to acces the images i get an Error.

    It is possible for me to get the first <xsl:when to return an image, but at the 2nd i get an system.OverflowExceptions:

     

    The code:

    <xsl:for-each select="$parent/* [@isDoc and @level &lt;= $depth]"
        
        <xsl:choose>
          
          <!--  ducument type = Category -->
          <xsl:when test="self::Category">
            <href="{umbraco.library:NiceUrl(@id)}">
              <img alt="{@nodeName}" src="{umbraco.library:GetMedia(categotyImage,0)/umbracoFile}" />
            </a>
            <xsl:if test="count(./* [@isDoc and @level &lt;= $depth]) &gt; 0">      
              <xsl:call-template name="drawNodes">    
                <xsl:with-param name="parent" select="."/>    
              </xsl:call-template>   
            </xsl:if>   
          </xsl:when>
          
            
          <!-- document type = Type -->
          <xsl:when test="self::Type"
            <href="{umbraco.library:NiceUrl(@id)}">
              <img alt="{@nodeName}" src="{umbraco.library:GetMedia(typeImage,0)/umbracoFile}" />
            </a>
            <xsl:if test="count(./* [@isDoc and @level &lt;= $depth]) &gt; 0">  
              <xsl:call-template name="drawNodes">    
                <xsl:with-param name="parent" select="."/>    
              </xsl:call-template>   
            </xsl:if>
          </xsl:when>
            
          <!--  -->
          <xsl:otherwise>
          </xsl:otherwise>
          
        </xsl:choose
        
      </xsl:for-each

    Regards Martin

Please Sign in or register to post replies

Write your reply to:

Draft