Ive got a macro for rendering the media selected by the user. Its passing through the file location (the number) but i can't seem to create the correct pointer. my attempt Is as follows
@warren - I've tested the variables and they are outputting the correct value... I think (its showing a number which I understand is the value of the media item?) I shall hardcode it now and let you know.
@Soren - Yes its the same $content, thats the variable containing the media file name (again I understand it to be the media file name) its used to check if there is something in it and then it runs the value-of.
Media Picker Macro
Howdy
Ive got a macro for rendering the media selected by the user. Its passing through the file location (the number) but i can't seem to create the correct pointer. my attempt Is as follows
I've done it before but i didnt use variables (i have several media items on one page and i want to reuse this macro)
any help is aprreciated.
Thanks
Alec
Test it with hardcoded values first rather than variables first to make sure your xPath is correct etc...
Then if that works - ouput your variables to make sure the correct info/data is being passed in.
Hope this helps you out.
Come back if your still stuck.
Warren :)
Can you show us the entire xslt.
I see a problem in your $content - what's that?
in your value-of - you use another $content or is this the same.
@warren - I've tested the variables and they are outputting the correct value... I think (its showing a number which I understand is the value of the media item?) I shall hardcode it now and let you know.
@Soren - Yes its the same $content, thats the variable containing the media file name (again I understand it to be the media file name) its used to check if there is something in it and then it runs the value-of.
Thanks for the replies!
Alec
Ok apologies for the double post. Just changed the code to
which works, ecocover is currently the value I am passing into the variable $content.
So I must be doing something right!
and just to top it off, the usual happens.
Sorted it out within 10 minutes of playing with it. Thanks for the help guys! the solution was
I must have tried every combination bar that one!
again, thanks!
Alec
is working on a reply...