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 661 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 4861 posts 12138 karma points MVP 3x 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 661 karma points
    Jan 26, 2012 @ 11:49
    Martin
    0

    Thanks Jeroen.

    Works a treat.

  • 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