I'm using the damp multi with "Full media xml". This is brilliant as I then have the xml directy. And it all works when selecting the property directly in xslt.
But if I choose to use specify which field to use in a macro paramenter then the value is always empty?
Tom is right. You can't pass xml as a macro parameter. I think nowadays that's the only thing xml properties don´t support. You can get it with an XPath, the node factory or LinqToUmbraco. It´s your choice :).
Macro parameters
Hi sir,
Fantastic project. Thanks for sharing it.
I'm using the damp multi with "Full media xml". This is brilliant as I then have the xml directy. And it all works when selecting the property directly in xslt.
But if I choose to use specify which field to use in a macro paramenter then the value is always empty?
Best
Jesper
To clarify:
If I do like this:
<umbraco:Macro Alias="Stan_topimage" imgFile="[$topImage]" runat="server"></umbraco:Macro>
.. and add imgFile as parameter to the macro ... then
<xsl:value-of select="/macro/imgFile"/> returns nothing
but
<xsl:value-of select="$currentPage/topImage"/> works.
Best
Jesper
Hi Jesper,
If I recall, you can't pass in XML data through macro parameter syntax, so the same thing happens for datatypes like Related Links.
To work around this in the past I've instead passed in the alias of the property and retrieved the data from XSLT.
And in xslt:
You could check recursively in the XSLT also.
-Tom
Tom is right. You can't pass xml as a macro parameter. I think nowadays that's the only thing xml properties don´t support. You can get it with an XPath, the node factory or LinqToUmbraco. It´s your choice :).
Jeroen
Thanks Tom and jeroen,
I'll fetch it in xslt then.
Best
Jesper
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.