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?
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:
[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 .. :-)
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?
Hi,
use GetMedia() function for that:
[code][/code]
Hope this helps
Regards,
/Dirk
[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.
This is the one I use:
[quote][/quote]
Any luck with that?
Try this:
[code]
[/code]
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=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 .. :-)
is working on a reply...