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?
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).
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
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
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
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
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
is working on a reply...