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
    Mar 08, 2012 @ 10:34
    Martin
    0

    Multiple Images with DAMP Problem

    Hi, Im trying to output multiple images using the DAMP.

    It works fine when I select only one image. But when mulitple images are selected, I get a parsing error.

    My XSLT is 

    <xsl:template match="/">
    <h3>GALLERY</h3>
        <xsl:variable name="media" select="$currentPage/caseImage" />
        <xsl:for-each select="$media"
           <xsl:variable name="mediaNode" select="umbraco.library:GetMedia($media, 0)" />
           <img class="scale-with-grid" src="{$mediaNode/umbracoFile}" alt="{@nodeName}"/>
        </xsl:for-each>  
    </xsl:template>

     

    From other posts on the forum, Ive seen the variable path point to "/DAMP/mediaItem/Image"

    Is this required somehow for DAMP?

    Any help would be grateful

    Martin


  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    Mar 08, 2012 @ 12:07
    Chriztian Steinmeier
    0

    (DELETED)

  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    Mar 08, 2012 @ 12:12
    Chriztian Steinmeier
    0

    OK, I give up - tried to edit my answer but this editor just plain doesn't work the way it should, here's the corrected code:

    <xsl:variable name="media"select="$currentPage/caseImage/DAMP[@fullMedia]/mediaItem" />
    
    ...
    
    <!-- Inside for-each -->
    <xsl:variable name="mediaNode"select="Image" />
    

    /Chriztian

Please Sign in or register to post replies

Write your reply to:

Draft