Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi, here's my problem. In my masterpage, I call a macro that should displays img and the width is the macro parameter:
<umbraco:Macro width="25px" Alias="AP_buttons" runat="server"></umbraco:Macro>
Here my xslt :
<xsl:param name="currentPage"/><xsl:variable name="width" select="/macro/width" /><xsl:template match="/"><!-- start writing XSLT --><table border="0" style="padding-top:8px;"> <tr> <td><img width="{$width}" src="/AP/layout/facebook.jpg" alt="Facebook"/></td>
But it doesn't work. If a change /macro/width by, for instance, 10, my img got 10px as width. But, the xslt doesn't get the value entered in masterpage. Do you see the problem?
Thank you
Hi Profiterole,
Quick check: Do you have a macro parameter who's alias is 'width' (Ok, stupid question, but may want to check it anyway)
If that's ok, did you try changing the name of the parameter, eg. ImgWidth instead of width?
Looking forward to your tests.
Cheers,
/Dirk
Ok, you got it!! I have 2 macro with width parameter. So I changed one to imgwidth and it works!! You're the king!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
xslt not getting macro parameter
Hi, here's my problem. In my masterpage, I call a macro that should displays img and the width is the macro parameter:
Here my xslt :
But it doesn't work. If a change /macro/width by, for instance, 10, my img got 10px as width. But, the xslt doesn't get the value entered in masterpage. Do you see the problem?
Thank you
Hi Profiterole,
Quick check: Do you have a macro parameter who's alias is 'width' (Ok, stupid question, but may want to check it anyway)
If that's ok, did you try changing the name of the parameter, eg. ImgWidth instead of width?
Looking forward to your tests.
Cheers,
/Dirk
Ok, you got it!! I have 2 macro with width parameter. So I changed one to imgwidth and it works!! You're the king!
is working on a reply...