I don't think you're able to pass values to a macro using umbraco:item.
I think what you need to do is add the itemName parameter on the macro as a "content picker" type where you can select a node from the tree and do some magic with the returned id in your user control.
Passing Item to .Net Macro inside Template
Hi all
Hopefully a simple one for you guys to answer...
I need to pass a Item value to my .Net macro inside my template. My code below dosen't work. What is the correct approach ?
Thanks for any help!
<umbraco:Macro
itemName=<umbraco:Item field="courseVenue" runat="server"></umbraco:Item>
Alias="MyControl" runat="server"></umbraco:Macro>
Hi Michael
I don't think you're able to pass values to a macro using umbraco:item.
I think what you need to do is add the itemName parameter on the macro as a "content picker" type where you can select a node from the tree and do some magic with the returned id in your user control.
Hope this help.
/Jan
Hi!
It should be possible, using the following syntax (sample from wiki-page http://our.umbraco.org/wiki/reference/templates/umbracomacro-element/macro-parameters/advanced-macro-parameter-syntax )
Regards
Jonas
D'oh! How could I forget that...
Thanks Jonas :-)
/Jan
Thank you :D
Thank you, Michael, for asking what I asked myself.
And thanks heaps, Jonas, for your simple and perfect answer :)
Rudi
is working on a reply...