Copied to clipboard

Flag this post as spam?

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


  • andy_rose 91 posts 117 karma points
    May 07, 2009 @ 11:34
    andy_rose
    0

    How to dispaly images from child nodes?

    I am trying to display a summary of child nodes in a page and part of this is to display an image from the child node document type defined by a media picker property.
    I have used the following xslt however the image url is not correct (it just returns the image node id)

    [code]
















  • [/code]

    Can anyone give me any pointers as to how to display these images?

Copy Link
  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    May 07, 2009 @ 11:43
    Dirk De Grave
    0

    Hi,

    use GetMedia() function for that:

    [code][/code]

    Hope this helps

    Regards,
    /Dirk

    Copy Link
  • andy_rose 91 posts 117 karma points
    May 07, 2009 @ 11:53
    andy_rose
    0

    [quote=Dirk]Hi,

    use GetMedia() function for that:

    [code][/code]

    Hope this helps

    Regards,
    /Dirk
    [/quote]

    Hi Dirk. I've tried this but when I try and save the XSLT file I get the following error:

    (XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)

    If I skip test then then I just gget an error stating and Error parsing the XSLT.

    Copy Link
  • Rasmus Berntsen 215 posts 253 karma points c-trib
    May 07, 2009 @ 12:26
    Rasmus Berntsen
    0

    This is the one I use:

    [quote][/quote]

    Any luck with that?

    Copy Link
  • Rasmus Berntsen 215 posts 253 karma points c-trib
    May 07, 2009 @ 12:29
    Rasmus Berntsen
    0

    Try this:

    [code]


















  • [/code]

    Copy Link
  • andy_rose 91 posts 117 karma points
    May 07, 2009 @ 12:35
    andy_rose
    0

    I found out the problem. It appears that ./data [@alias = 'newsImage' is not trusted to return anything. As soon as I put an if statement around this to ensure that it would return a value it compiled and worked as expected:

    [code][/code]

    I think I need to learn more about xslt :-"

    Copy Link
  • Jonas Høiby 30 posts 20 karma points
    Jun 10, 2009 @ 14:52
    Jonas Høiby
    0

    [quote=andy_soundgarden]I found out the problem. It appears that ./data [@alias = 'newsImage' is not trusted to return anything. As soon as I put an if statement around this to ensure that it would return a value it compiled and worked as expected:

    [code][/code]

    I think I need to learn more about xslt :-" [/quote]

    I agree .. need to learn more XSLT .. had the same problem .. hehe .. but then again .. only been learning XSLT for a little less than a week now .. :-)

    Copy Link
  • Please Sign in or register to post replies

    Write your reply to:

    Draft