Copied to clipboard

Flag this post as spam?

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


  • Inmedia 124 posts 176 karma points
    May 10, 2011 @ 12:10
    Inmedia
    0

    XSLT problems with images

    Hi Guys

    I am building an image gallery, in Umbraco 4.7.0...

    In earlier versions of Umbraco I did this by doing so:

     

    <xsl:for-each select="$currentPage/* [string(data [@alias='umbracoNaviHide']) != '1']">
      
    <
    a href="{data [@alias = 'umbracoFile']}" id="single_image" class="grouped_elements" rel="group1">
              <img class="image-border" height="410px" src="{concat(substring-before(data [@alias='umbracoFile'],'.'), '_thumb_616.jpg')}"/>
    </a>

    </xsl:for-each>

     

    I don't know what to change to make it work, can anyone please help me out? :)

     

    // Mikkel

     


  • Chriztian Steinmeier 2726 posts 8320 karma points MVP 4x admin c-trib
    May 10, 2011 @ 12:32
    Chriztian Steinmeier
    0

    Hi Mikkel,

    You should be able to get by with this:

    <xsl:for-each select="$currentPage/*[@isDoc][not(umbracoNaviHide = 1)]">
        <a href="{umbracoFile}" id="single_image" class="grouped_elements" rel="group1">
            <img class="image-border" height="410" src="{concat(substring-before(umbracoFile, '.jpg'), '_thumb_616.jpg')}" />
        </a>
    </xsl:for-each>

    /Chriztian 

  • Søren Tidmand 127 posts 364 karma points
    May 10, 2011 @ 12:33
    Søren Tidmand
    0

    Hi Mikkel,

    First of all it seems to me to be a question of which XML schema you're using. Is it a brand new 4.7.0 installation or an update? Please look at the following link to get further info about the new and old XML schema and how to switch:

    http://our.umbraco.org/wiki/reference/xslt/45-xml-schema/switching-between-old-and-new-schema

    Best regards,
    Søren

  • Inmedia 124 posts 176 karma points
    May 10, 2011 @ 12:40
    Inmedia
    0

    Chriztian, that was exactly what I needed to do... It works like a charm now :)

    Thank you.

    Søren, yes I am working on a brand new Umbraco 4.7 installation.
    I will read the link you send right away, so I know how to deal with stuff like this, next time... Thank you.

    // Mikkel

  • 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