Copied to clipboard

Flag this post as spam?

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


  • vlad 3 posts 50 karma points
    Aug 07, 2014 @ 12:33
    vlad
    0

    Custom Parameter for Macro Partial View Umbraco 7

    Hi,

    How to render the custom parameters for macro partial view using the properties from model mvc? I need set something in the model or add the another class for inheritance?

    I appreciate for your reply

  • Dennis Aaen 4457 posts 17970 karma points admin hq c-trib
    Aug 07, 2014 @ 12:51
    Dennis Aaen
    0

    Hi vlad and welcome to Our,

    I am not a backend developer, so maybe I misunderstood your question here,

    But when you create a marco, you can add parameters to it, and when you added the marco to your template you will prompt to fill out the params.

    http://our.umbraco.org/documentation/reference/templating/macros/razor/using-macro-parameters

    Or you can render a macro with some parameters using an anonymous object

    http://our.umbraco.org/documentation/Reference/Mvc/views#RenderingMacros

    Hope this helps,

    /Dennis

  • vlad 3 posts 50 karma points
    Aug 07, 2014 @ 13:28
    vlad
    0

    Hi Dennis,

    Thanks for reply. I need add the parameters from model. If add the new macro with mvc partial view in umbraco cms, I need the macro added automatically the parameters from model (where is selected in partial view). I know it is posible if add the macro with usercontroler from asp.net (if I create the usercontroller in asp and I create the new macro with this usercontroller, it associated the property from usercontroller and it added the parameters).

    Thanks,

    Vlad

  • vlad 3 posts 50 karma points
    Aug 07, 2014 @ 14:18
    vlad
    0

    This example:

    http://umbraco.com/help-and-support/video-tutorials/introduction-to-umbraco/developer-introduction/macro-parameters.aspx

    is for add macro with usercontroller asp.net, but I need create the macro with mvc partial view. I don't know when add parameters from macro using property from mvc model

  • 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