I have a macro that is returning the path of an image. I'm trying to use that path inside a div tag. This is probably pretty simple but my HTML skills aren't cutting it. Hope someone can help!
I've confirmed by just inserting the macro by itself in the HTML that it does return the correct path to the image. However when I try to embed the macro in the <div> tag it just displays the syntax for the macro in the html.
And what if you use single quotes in your style attribute, cause now the style attribute gets ended by the first double quote on source attribute of your macro.
Alternatively, you could move the div to the xslt (assuming it's a xlst being referenced by the macro) or, pass some extra parameters onto the macro (for your div's class for example.
Problem with returning value of a XSLT Macro
I have a macro that is returning the path of an image. I'm trying to use that path inside a div tag. This is probably pretty simple but my HTML skills aren't cutting it. Hope someone can help!
Here's my HTML tag with the macro embedded:
I've confirmed by just inserting the macro by itself in the HTML that it does return the correct path to the image. However when I try to embed the macro in the <div> tag it just displays the syntax for the macro in the html.
From the source of the published page:
I'm using v4.5 and thanks for the help!
Do you not need quotes around the source?
Thanks, Just tried that and all it did was add quotes in the rendered html.
And what if you use single quotes in your style attribute, cause now the style attribute gets ended by the first double quote on source attribute of your macro.
Alternatively, you could move the div to the xslt (assuming it's a xlst being referenced by the macro) or, pass some extra parameters onto the macro (for your div's class for example.
Cheers,
/Dirk
The single quotes on the style attribute took care of the issue! Thanks!
The template HTML now looks like this and works .....
is working on a reply...