Everythings is working and the hijacking is working properly, however I wanted to have some proper MVC routing, so for example I could pass arguments to the controller as well.
So I would end up with something like this:
namespace Cultiv.Controllers
{
public class BlogOverviewController : RenderMvcController
{
public ActionResult BlogOverview(BlogOverview model, string argument1)
{
if (model.Page == 0) // default value for int
model.Page = 1;
// do paging
return CurrentTemplate(model);
}
}
}
Hey antao, thank you for your answer. However the question isn't trivial I think. I have the feeling I will need to create a route for this, but that would make me bypass umbraco.
MvcRenderController with Arguments
I've been developing a news page using Umbraco 7. I strubbled on this page https://cultiv.nl/blog/whats-this-umbraco-route-hijacking-all-about/ and basically built exactly the same.
Everythings is working and the hijacking is working properly, however I wanted to have some proper MVC routing, so for example I could pass arguments to the controller as well.
So I would end up with something like this:
You can do that without any problems Cedric, just make sure pass the argument1 and the the asp.net mvc modelbinder will take care of the rest.
Hey antao, thank you for your answer. However the question isn't trivial I think. I have the feeling I will need to create a route for this, but that would make me bypass umbraco.
is working on a reply...