get an image folder parameter (folder present in the media section) from macro in Umbraco and then loop through the all the images. First thing I check that folder is not empty and then during the loop I further try to check if an image name is equal to "marhall_spadayhpbanner_jul131%20(4).jpg" then I need to put a different link to anchor. I have tried the following xslt code but for some reason its not working as expected and the second condition (when image equal to 'media/42595/marhall_spadayhpbanner_jul131%20(4).jpg' ) is never true.
What version of Umbraco are you using? The above example is using the old XML schema, which was changed in Umbraco 4.5 so if you're using a newer version of Umbraco that's why the above does not work and we need to refactor it.
umbraco macro XSLT not working
get an image folder parameter (folder present in the media section) from macro in Umbraco and then loop through the all the images. First thing I check that folder is not empty and then during the loop I further try to check if an image name is equal to "marhall_spadayhpbanner_jul131%20(4).jpg" then I need to put a different link to anchor. I have tried the following xslt code but for some reason its not working as expected and the second condition (when image equal to 'media/42595/marhall_spadayhpbanner_jul131%20(4).jpg' ) is never true.
Hi Methab
What version of Umbraco are you using? The above example is using the old XML schema, which was changed in Umbraco 4.5 so if you're using a newer version of Umbraco that's why the above does not work and we need to refactor it.
/Jan
thanks for the reply Jan. I m using and old version of umbraco 4.0.3.
Hi Mehtab,
It probably didn't work because the umbracoFile property will output an absolute path (starting with a slash).
You should be able to just do this - I assumed you didn't want the link + image twice, in case of a match:
/Chriztian
is working on a reply...