I have been working on a media picker for my home page. Basically I want to be able to pick an image and have the xslt retrieve the image data for rendering into HTML.
I am using the Improved Media Picker and my code is as follows:
Thus far so good, my parameter gets passed through to the XSLT
Most of my XSLT works ok, all of it that is apart from getting the umbracoWidth and umbracoHeight values which always seem to return empty strings. My XSLT code is as follows:
In your $media you where including the filename of the file, so I'm pretty sure this is what's wrong. I haven't tested the above code though, but you could try giving it a shot :)
Unable to get image height or width in Macro
Hi,
I have been working on a media picker for my home page. Basically I want to be able to pick an image and have the xslt retrieve the image data for rendering into HTML.
I am using the Improved Media Picker and my code is as follows:
Template:
Thus far so good, my parameter gets passed through to the XSLT
Most of my XSLT works ok, all of it that is apart from getting the umbracoWidth and umbracoHeight values which always seem to return empty strings. My XSLT code is as follows:
I think I must be doing something fundamentally wrong here. Please could someone point me in the right direction.
I'm pretty sure this post is most related to your other post and resolved as such?
Cheers,
/Dirk
Hi there Greyhound
Are your $url working as well?
As far as I can see the $media contains a lillte to much. Maybe you can try this:
In your $media you where including the filename of the file, so I'm pretty sure this is what's wrong. I haven't tested the above code though, but you could try giving it a shot :)
/Kim A
Hi,
Dirk De Grave - I somehow ended up with two posts. Once wasn't appearing for me so I posted again.
Kim A - thank you for posting this it is indeed correct.
Thanks for making this one of the best forums I have ever used.
is working on a reply...