Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Peter Alcock 113 posts 176 karma points
    Mar 22, 2013 @ 12:40
    Peter Alcock
    0

    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

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 22, 2013 @ 16:17
    Jan Skovgaard
    0

    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

  • Peter Alcock 113 posts 176 karma points
    Mar 22, 2013 @ 16:22
    Peter Alcock
    0

    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

  • Peter Alcock 113 posts 176 karma points
    Mar 22, 2013 @ 16:23
    Peter Alcock
    0

    The Literal1.Text by the way is built from the logged in members property named 'favourite'

  • 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.

Please Sign in or register to post replies