I think im being really daft but can't quite get this working! I have the below macro which is being called inside a C# usercontrol. I need to set the parameter 'PropertyID' to a string or even a javascript variable whichever is easiest.
It doesn't necessarily have to be javascript, I basicaly have a string thats built onto Literal1.Text and i need that value to be the PropertyID parameter value if that makes more sense?
Simple Question! Macro parameters in usercontrol
Hi all,
I think im being really daft but can't quite get this working! I have the below macro which is being called inside a C# usercontrol. I need to set the parameter 'PropertyID' to a string or even a javascript variable whichever is easiest.
<umbraco:Macro ID="Macro1" PropertyID="4253" Alias="ucBookingForms" runat="server"></umbraco:Macro>
Needs to be
<umbraco:Macro ID="Macro1" PropertyID="(Javascript variable or Literal.text" Alias="ucBookingForms" runat="server"></umbraco:Macro>
Hope makes sense
Pete
Hi Peter
Not sure why you want to use JavaScript in the parameter?
You can see the possible options here http://our.umbraco.org/documentation/Reference/Templating/Macros/ ;
I asume that you need to use [#pageId] to have the proper propertyId parameter perhaps?
/Jan
Hi Jan,
It doesn't necessarily have to be javascript, I basicaly have a string thats built onto Literal1.Text and i need that value to be the PropertyID parameter value if that makes more sense?
Thanks
Pete
The Literal1.Text by the way is built from the logged in members property named 'favourite'
is working on a reply...