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
    Jan 26, 2012 @ 11:43
    Martin
    0

    DAMP - Multiple Files

    Hi,
    Im using the DAMP to show a list of PDF's.

    Ive changed the datatype to show mulitple items.

    My problem being that when i load multiple files, it is repeating the first file. 

        <!--DAMP File - DOWNLOAD-->  
          <xsl:variable name="file" select="dampFile/DAMP/mediaItem/File" />
          <xsl:if test="$file">
          <ul>
          <xsl:for-each select="$file">  
            <li class="download"><href="{$file/umbracoFile}" target="_blank"><xsl:value-of select="$file/@nodeName"/></a></li>
          </xsl:for-each
          </ul
          </xsl:if>

     

    Thanks

    Martin

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Jan 26, 2012 @ 11:45
    Jeroen Breuer
    1

    Almost good :). Try this:

        <!--DAMP File - DOWNLOAD-->  
          <xsl:variable name="file" select="dampFile/DAMP/mediaItem/File" />
          <xsl:if test="$file">
          <ul>
          <xsl:for-each select="$file">  
            <li class="download"><a href="{umbracoFile}" target="_blank"><xsl:value-of select="@nodeName"/></a></li>
          </xsl:for-each> 
          </ul> 
          </xsl:if>

    Jeroen

  • Martin 278 posts 662 karma points
    Jan 26, 2012 @ 11:49
    Martin
    0

    Thanks Jeroen.

    Works a treat.

Please Sign in or register to post replies

Write your reply to:

Draft