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 All,
I'm using 4.0.3 on a client site and trying to pass a parameter through a macro into the XSLT
This is my code:
<xsl:param name="currentPage"/><xsl:param name="imageFolder" select="/macro/selectedfolder" /><xsl:template match="/"> <xsl:copy-of select="$imageFolder" /> <xsl:if test="$imageFolder != ''"> <xsl:for-each select="umbraco.library:GetMedia($imageFolder,'false')/node"> <xsl:element name="img"> <xsl:attribute name="alt"> <xsl:value-of select="@nodeName"/> </xsl:attribute> <xsl:attribute name="src"> <xsl:value-of select="./data [@alias='umbracoFile']" /> </xsl:attribute> </xsl:element> </xsl:for-each> </xsl:if></xsl:template>
But nothing is coming through, the parameter type is mediaCurrent()
Thanks
Tom
Try look at macro parameters. Put this before your code, any you can see parameter values
<textarea> <xsl:copy-of select="/macro" /></textarea>
Petr
Hi Petr,
Thats returns <macro />.
Go to macro definition and add macro parameters on parameters tab.
If you have set it correctly, try post html which call macro and your version of umbraco.
Ok, I've added another parameter contentPicker and that is returning a value but the mediaCurrent is always getting lost when getting published.
Right this is wierd, I've removed it and added it again and now it works!!
CONFUSED!!
Thanks for the hint re the textarea
I'm glad it help. You can mark one of my answers like solution :-)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Macro parameters not passing through
Hi All,
I'm using 4.0.3 on a client site and trying to pass a parameter through a macro into the XSLT
This is my code:
But nothing is coming through, the parameter type is mediaCurrent()
Thanks
Tom
Try look at macro parameters. Put this before your code, any you can see parameter values
Petr
Hi Petr,
Thats returns <macro />.
Tom
Go to macro definition and add macro parameters on parameters tab.
If you have set it correctly, try post html which call macro and your version of umbraco.
Ok, I've added another parameter contentPicker and that is returning a value but the mediaCurrent is always getting lost when getting published.
Right this is wierd, I've removed it and added it again and now it works!!
CONFUSED!!
Thanks for the hint re the textarea
Tom
I'm glad it help. You can mark one of my answers like solution :-)
is working on a reply...