I have Umbraco 4.5.1 (asp.net v4) running on windows server 2003 (web).
I have set a property called galImages (mediapicker) on a gallery doctype to specify which media folder to look through and then using this xslt code to return a simple set of img tags just with their source.
I think this code may be a combination of new and old xslt, but I've tried various that I've found in the forum and elsewhere and set umbraco.config to use legacy xslt but no luck (came close a few times). The most frequent xslt error is this and the above code would raise it.
System.OverflowException: Value was either too large or too small for an Int32.
I have a few sites that pull this information but their xslt's with legacy=true didnt seem to work at all.
I tried using '[LM] loop media folder Images' package (which worked well) but I couldn't set it to pick up the different media folders from the template depending on the galImages property. If there is a way this would be a good solution for me but straight xslt would be better.
I'd double check your alias names as they are case sensitive. Also try republishing your page to force it to resave. Could also check umbraco.config file to make sure it is all as you'd expect
Pulling photos from a media folder
I have Umbraco 4.5.1 (asp.net v4) running on windows server 2003 (web).
I have set a property called galImages (mediapicker) on a gallery doctype to specify which media folder to look through and then using this xslt code to return a simple set of img tags just with their source.
I think this code may be a combination of new and old xslt, but I've tried various that I've found in the forum and elsewhere and set umbraco.config to use legacy xslt but no luck (came close a few times). The most frequent xslt error is this and the above code would raise it.
I have a few sites that pull this information but their xslt's with legacy=true didnt seem to work at all.
I tried using '[LM] loop media folder Images' package (which worked well) but I couldn't set it to pick up the different media folders from the template depending on the galImages property. If there is a way this would be a good solution for me but straight xslt would be better.
Thanks for any help
Lee
Hi Lee,
Try the following:
Matt
Hi Matt
Thanks for answering so quickly.
The string-length test seems to be failing but I do have a galImages media picker which is set to a media folder.
Thanks
Lee
I'd double check your alias names as they are case sensitive. Also try republishing your page to force it to resave. Could also check umbraco.config file to make sure it is all as you'd expect
Matt
Hi Lee,
I've just done the same on one of my sites - please check this:
http://blackpoint.dk/umbraco-workbench/xslt/accessing-media-files.aspx?p=3
Note that the parameter of the macro should be called "MediaNote".
Have fun!
/Brian
I have one here where the ID is hardcoded. It runs on the old schema (if you use that - can't tell):
Thanks Matt for your help. The answer was I was using the legacy schema and hadn't set it back to false. Thanks for pointing the way.
I want to high five you Brian but can't so I'll say it here...this would have helped loads.
Thanks guys for all your help.
Lee
is working on a reply...