Umbraco 6.1.6 - Access Macro Parameters within a Surface Controller
Hi, I'm converting some older web forms style macros to the MVC style and I'm trying to find a way of accessing macro paramters within a Surface Controller.
Originally I had this:
Macro - 5 x Parameters
User Control / Code behind - 5 x Public Properties (for macro parameters)
Now I have:
Macro - 5 x Parameters
Macro Partial View
View for a Form with Stronlgy Typed Model
Surface Controller
My main question is, how can I access macro parameters in the controller?
If this process looks flawed or there is a better way, let me know.
Umbraco 6.1.6 - Access Macro Parameters within a Surface Controller
Hi, I'm converting some older web forms style macros to the MVC style and I'm trying to find a way of accessing macro paramters within a Surface Controller.
Originally I had this:
Hi Paul
You can get access to your macro parameters in your MacroPartial
(because the model inherits from Umbraco.Web.Macros.PartialViewMacroPage)
using:
You can pass these to a Surface controller action by using additional data in RouteValues eg:
or in your BeginUmbracoForm
or as a 'hidden field' on the model you pass to the Partial View:
But the surface controller inself is not aware of the Macro, and it's parameters if that makes sense?
regards Marc
is working on a reply...