Creating Macro/XSLT for use in the editor which selects images from Media Picker
Hi everyone,
I have a need to place a Macro inside my page, via the editor, which requests two images to be selected from the Media Picker. The images need to have some other HTML tags around them hence the reason for the Macro approach.
So I have created my Macro and two parameters named: "photoIcon" for image 1 and "prodPhoto" for image 2, both with the mediaCurrent type. Dropping the macro into my page via the editor works fine and I can select the images. I'm having a bit of trouble with the XSLT however.
What I am trying to do is to extract the path to the two images and put them into the XSLT. I've created the following XSLT but it basically shows nothing when rendered so far:
I've basically started by just trying to output the first image (photoIcon) - and got stuck here - so I've not added the other HTML elements around the IMG tag at this stage.
Any help would be much appreciated. I'm a novice when it comes to XSLT so still learning lots. By the way, this is version 4.0.3
Use a browser with some debug tool and inspect the red div to see what's returned by the xsl:copy-of. This should give you some pointers on what's happening.
Creating Macro/XSLT for use in the editor which selects images from Media Picker
Hi everyone,
I have a need to place a Macro inside my page, via the editor, which requests two images to be selected from the Media Picker. The images need to have some other HTML tags around them hence the reason for the Macro approach.
So I have created my Macro and two parameters named: "photoIcon" for image 1 and "prodPhoto" for image 2, both with the mediaCurrent type. Dropping the macro into my page via the editor works fine and I can select the images. I'm having a bit of trouble with the XSLT however.
What I am trying to do is to extract the path to the two images and put them into the XSLT. I've created the following XSLT but it basically shows nothing when rendered so far:
I've basically started by just trying to output the first image (photoIcon) - and got stuck here - so I've not added the other HTML elements around the IMG tag at this stage.
Any help would be much appreciated. I'm a novice when it comes to XSLT so still learning lots. By the way, this is version 4.0.3
Many thanks,
Mike
Suggest you digg into it using
Use a browser with some debug tool and inspect the red div to see what's returned by the xsl:copy-of. This should give you some pointers on what's happening.
Cheers,
Harald.
try this
/horst
ok, i see, my approach doesn't work :-(
will post if i got solution
/horst
Thanks for your input Harald and Horst. I got it working with the following in the end:
is working on a reply...