I just had a couple of questions about structuring a solution.
1. Would you generally use custom controllers with custom view models for the overall layout of the page etc and then when dealing with gets and posts have to use surface controllers?
2. Can a conventional controller that has hijacked a route handle the gets and posts or does it have to be done with partial views and surface controllers?
3. If you wanted to make use of the new 4.5 API controllers etc would the best way be to custom route and then add to umbracos reserved urls?
Playing around with 4.10 and been reading up on the md docs on github re strongly typed partial views.
Just wondering if you had a scenario where you wanted to pass a custom ViewModel down into a partial for use would you need to assign that partial view to the ViewBag as described here: our.umbraco.org/.../30706-Passing-Models-to-Partial-Views
or alternatively is there a cleaner solution.
What I'm having difficulty understanding is how you could work with custom views within the new Mvc functionality.
I tried running up a PartialView like this example:
and in the partial when trying to access properties of the Model using @Model.Content.GetProperty("blah").Value is returning Umbraco.Web.Models.XmlPublishedContentProperty
Umbraco 4.10.0 Razor Views and Partials
I just had a couple of questions about structuring a solution.
1. Would you generally use custom controllers with custom view models for the overall layout of the page etc and then when dealing with gets and posts have to use surface controllers?
2. Can a conventional controller that has hijacked a route handle the gets and posts or does it have to be done with partial views and surface controllers?
3. If you wanted to make use of the new 4.5 API controllers etc would the best way be to custom route and then add to umbracos reserved urls?
Playing around with 4.10 and been reading up on the md docs on github re strongly typed partial views.
Just wondering if you had a scenario where you wanted to pass a custom ViewModel down into a partial for use would you need to assign that partial view to the ViewBag as described here: our.umbraco.org/.../30706-Passing-Models-to-Partial-Views
or alternatively is there a cleaner solution.
What I'm having difficulty understanding is how you could work with custom views within the new Mvc functionality.
I tried running up a PartialView like this example:
and in the partial when trying to access properties of the Model using @Model.Content.GetProperty("blah").Value is returning Umbraco.Web.Models.XmlPublishedContentProperty
Cheers,
Tom
is working on a reply...