I've taken a slightly different approach to your example in that I dont want my custom routes to appear at all in the Umbraco UI, I guess almost like a custom app inside my umbraco install. But I DO want to continue to use all of my UI built around what is in the umbraco tree.
I've used your example to get the root node of my site and use this as my context for getting IPublishedContent which I can then pass into my model (which happens to be a form). The problem now is when I postback the form I get the paramterless constructor object error. This because in the GET i'm newing up my model and inheriting from "RenderModel" in a similar way to your method example. On the POST the model needs to be returned in the form, but this time the constructor has to be paramaterless to work. Unfortunately I cannot pass in the Umbraco context as a base because my custom route is not part of any matched content in the umbraco back office.
Custom route question
Shannon, hopefully you'll pick this up....
http://shazwazza.com/post/Custom-MVC-routing-in-Umbraco
Referring to your blog post above
I've taken a slightly different approach to your example in that I dont want my custom routes to appear at all in the Umbraco UI, I guess almost like a custom app inside my umbraco install. But I DO want to continue to use all of my UI built around what is in the umbraco tree.
I've used your example to get the root node of my site and use this as my context for getting IPublishedContent which I can then pass into my model (which happens to be a form). The problem now is when I postback the form I get the paramterless constructor object error. This because in the GET i'm newing up my model and inheriting from "RenderModel" in a similar way to your method example. On the POST the model needs to be returned in the form, but this time the constructor has to be paramaterless to work. Unfortunately I cannot pass in the Umbraco context as a base because my custom route is not part of any matched content in the umbraco back office.
Is there any way I can rectify this?
Thanks Martin
is working on a reply...