This will be no different regardless of the schema used, but I seem to remember that .NET will overrule macroparameters with names like "height", "width", "cssClass" (and some others) because they end up as attributes on the <umbraco:Macro> UserControl that's used in the Template.
Try renaming the parameters to setWidth, setHeight or something similar (remember to change the reference in XSLT too).
How to get a number passed by macro in 4.5.2(new schema)?
I do it like that:
<variable name="width" select="number(macro/width)"/>
but $width has nothing
Hi sun,
This will work anywhere inside an XSLT file:
(You missed the forward slash before macro, so yours would only work inside the match="/" template)
/Chriztian
<xsl:variable name="height" select="number(/macro/height)"/>
I do it like you said, but it has nothing changed.
this is work with Umbraco 4.0.4.2
But I don't know why it can't work with Umbraco 4.5.2(new schema)
Hi sun,
This will be no different regardless of the schema used, but I seem to remember that .NET will overrule macroparameters with names like "height", "width", "cssClass" (and some others) because they end up as attributes on the <umbraco:Macro> UserControl that's used in the Template.
Try renaming the parameters to setWidth, setHeight or something similar (remember to change the reference in XSLT too).
/Chriztian
thanks for your great answer. I have resolved it.
is working on a reply...