I have setup some XSLT code that shows a list of subpages with a link to them, I also want it to show a thumbnail as a link. The thumbnail is selected using a media picker on the page that the link is point too. So so I have this:
[code]
[/code]
I did try this but it throws up errors when I try and save the XSLT, can anyone see what I am doing wrong?:
Your xslt looks fine in the xlst editor check disable checking then save it. It should work. Basically at compile time its trying to getmedia but it has no value however when you view page you will have media and it will work.
I usually use variable becuase for example in your case you are making 3 getmedia calls that 3 db trips then in a loop so can add up. Also You can wrap the lot with statement !='' then when in editor it should save
Create link to page with image
Hi,
I have setup some XSLT code that shows a list of subpages with a link to them, I also want it to show a thumbnail as a link. The thumbnail is selected using a media picker on the page that the link is point too. So so I have this:
[code]
[/code]I did try this but it throws up errors when I try and save the XSLT, can anyone see what I am doing wrong?:
[code]
[/code]Any suggestions on this? I currently have:
[code][/code]
Which gives me the node id as the image source, I need it to be the URL of the image instead so I thought that I could just change it to:
[code][/code]
But this throws up errors when I try and save the XSLT!!!
Tony,
Your xslt looks fine in the xlst editor check disable checking then save it. It should work. Basically at compile time its trying to getmedia but it has no value however when you view page you will have media and it will work.
Regards
Ismail
Excellent that works correctly, thanks for the quick reponse, I assume if I was to make thumbnail a variable then it would get around that issue.
Tony,
I usually use variable becuase for example in your case you are making 3 getmedia calls that 3 db trips then in a loop so can add up. Also You can wrap the lot with statement !='' then when in editor it should save
Regards
Ismail
I see, thank you for your help. I will look at changing it to a variable.
is working on a reply...