I'm trying to display a embedded PDF and am having some trouble passing the page parameter which is a media selector named "document". I have a working macro that just needs me to pass a value containing the NodeID of "document". I am currently trying this code:
I'm getting a parse error stating <umbraco:Item field="document" runat="server" /> "The 'Text' property of 'umbraco:Macro' does not allow child objects.
Using Page Parameter as Macro Parameter
I'm trying to display a embedded PDF and am having some trouble passing the page parameter which is a media selector named "document". I have a working macro that just needs me to pass a value containing the NodeID of "document". I am currently trying this code:
<umbraco:Macro Alias="OpenPDF" runat="server">
<umbraco:Parameter Name="pdfFile">
<umbraco:Item field="document" runat="server" />
</umbraco:Parameter>
</umbraco:Macro>
I'm getting a parse error stating <umbraco:Item field="document" runat="server" /> "The 'Text' property of 'umbraco:Macro' does not allow child objects.
Found a resolution, it is to use the xslt file to do all the work. here is the code that made it work:
Hi Dane,
Just chipping in with an alternate way to do it using the "Advanced Macro Parameter Syntax" :
Of course you'll need to grab the property in XSLT (which was probably what you already did in your original):
/Chriztian
is working on a reply...