Copied to clipboard

Flag this post as spam?

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


  • Simon 692 posts 1068 karma points
    Jun 03, 2015 @ 10:38
    Simon
    0

    Create Macro Parameters from Code Behind

    Hi All,

    How can I create macro parameters from view and pass values when render macro, instead of creating the macro parameters from the CMS?

    Thank you.

     

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Jun 03, 2015 @ 13:18
    Tim
    0

    If you mean just in Razor code, something like this should do it (the full documentation can be found here):

    @Umbraco.RenderMacro("myMacroAlias", new { name = "Ned", age = 28 })
  • 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