I currently have an xslt file that shows a list of News Items - each news item has a media picker section that allows the user to "Choose" a photo to go with each article. I am struggling to show this picture and wondered if someone could point where my XSLT is going wrong: I tried this first:
Which worked showing the same picture "ID of 1313" looping through each of the news items, but when I try to change this to choose each individual ID I don't get any errors, only the "Error reading xslt file" message on my page. This is what I tried:
Ahhh excellent worked great - it's been driving me mad because I'm not too good with XSLT but I could see everyone elses examples where pretty much the same. Thanks for the quick reply, Garry.
Showing pictures using Media Picker and XSLT
Hello everyone,
I currently have an xslt file that shows a list of News Items - each news item has a media picker section that allows the user to "Choose" a photo to go with each article. I am struggling to show this picture and wondered if someone could point where my XSLT is going wrong: I tried this first:
Which worked showing the same picture "ID of 1313" looping through each of the news items, but when I try to change this to choose each individual ID I don't get any errors, only the "Error reading xslt file" message on my page. This is what I tried:
In my Document Types > Generic properties my Media Picker is called "pic" so I presume that's right - can anyone see where it's going wrong?
Cheers, Garry.
I changed a few things
* Added a check for image before trying to write it
* Slightly adjusted getmedia call
Give this a shot!
Dan
Ahhh excellent worked great - it's been driving me mad because I'm not too good with XSLT but I could see everyone elses examples where pretty much the same. Thanks for the quick reply, Garry.
No worries, you'll get the hang of xslt and, if not love it, hate it just a little less ;-)
It's always good to put checks around anything that might blow up - getmedia is one of those things
is working on a reply...