Copied to clipboard

Flag this post as spam?

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


  • Keith Petersen 67 posts 111 karma points
    Oct 14, 2011 @ 20:29
    Keith Petersen
    0

    Macro parameters with Razor

    This question is basically the same as http://our.umbraco.org/projects/backoffice-extensions/digibiz-advanced-media-picker/digibiz-advanced-media-picker/22966-Macro-parameters but I'm looking for a Razor solution. I'm new with Razor in Umbraco and dynamics in C#. I haven't seen any examples using DAMP with parameters. (I want to use parameters so I can have reusable scripts/macros.)

    This obviously doesn't work:

    var link = Parameter.linkMedia;
    dynamic mediaItems = Model.link.mediaItem;

    I don't know how to get the string value of the linkMedia parameter and use it as the name of the property in mediaItems.

  • Jeroen Breuer 4909 posts 12266 karma points MVP 5x admin c-trib
    Oct 14, 2011 @ 23:24
    Jeroen Breuer
    1

    Hello Keith,

    I think this topic can help you: http://our.umbraco.org/forum/developers/razor/19984-Razor-variable-property.

    Jeroen

  • 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