Copied to clipboard

Flag this post as spam?

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


  • Apostolos 6 posts 26 karma points
    Dec 20, 2011 @ 11:07
    Apostolos
    0

    XSLT - GetMedia

    Hi to everyone, 

    I'm facing a problem with a multilingual site that I made. When I'm changing language, from greek to english in my example, there are some elements that are missing although that they are using the same XSLT. For example Some images are loaded in the greek version but in the english one are not.To be more precise, my code is

     <xsl:variable name="gallery" select="number($currentPage/gallery)" />
       <xsl:variable name="thumbWidth" select="number(256)" />
       <xsl:variable name="thumbHeight" select="number(170)" />
       <xsl:template match="/">
      <!-- Displays all images from a folder in the Media Library -->
          <xsl:if test="number($gallery)">
          <xsl:for-each select="umbraco.library:GetMedia($gallery, true())/Image">
           <xsl:if test="umbracoFile !=''">
              { src: '<xsl:value-of select="umbracoFile"/>', dir: 'up'   },
          </xsl:if>
           </xsl:for-each>
          { src: '/media/1533/santorini3.jpg',   dir: 'down' }
        </xsl:if>
        </xsl:template

    kind regards

    Apostolis

    P.S. I'm not so experienced in Umbracco so any help would be great

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Dec 20, 2011 @ 22:35
    Jan Skovgaard
    1

    Hi Apostolis

    How have you setup your content structure in Umbraco? Does it look something like this

    Home (GB)
       page
       page
       page
    Home (Greek)
       page
       page
       page

    Then it's 1-1 and then you should of course make sure that there has at all been selected any images on the different pages where something might seem to be missing.

    At a first glance I don't think the issue has to do with the code itself but a bit more information about how you have structured the site would be nice :)

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft