UmbracoControllerFactory to get the controller type. Adds SurfaceRouteHandler to ensure that UmbracoMvcHandler is used for all SurfaceControllers, and updates all routes accordingly. Streamlines the RenderRouteHandler to then just look up surface routes in the route table for posted values. This now ensures that UmbracoMvcHandler is used even with plugin surface controllers.
16 lines
461 B
C#
16 lines
461 B
C#
using System.Web;
|
|
using System.Web.Routing;
|
|
|
|
namespace Umbraco.Web.Mvc
|
|
{
|
|
/// <summary>
|
|
/// Assigned to all SurfaceController's so that it returns our custom SurfaceMvcHandler to use for rendering
|
|
/// </summary>
|
|
internal class SurfaceRouteHandler : IRouteHandler
|
|
{
|
|
public IHttpHandler GetHttpHandler(RequestContext requestContext)
|
|
{
|
|
return new UmbracoMvcHandler(requestContext);
|
|
}
|
|
}
|
|
} |