For developers: Classic MVC mode
Classic mode should be familiar to all ASP.NET MVC developers, because it is just plain controllers and views. The only difference is in the way you register your routes.
First, you should implement your custom controller, view and model that you want to use in classic mode. To learn how it’s done, read For developers: Create custom models, controllers, and views . After you have your controller, you should register a route for it.
Registering a route
This step is a little different in Sitefinity CMS, because of the specifics of its MVC support. Instead of using the RouteTable directly, you have to use the Bootstrapper class to register routes.
protected
void
Application_Start(
object
sender, EventArgs e)
{
Bootstrapper.MVC.MapRoute(
"Classic"
,
"customprefix/{controller}/{action}/{id}"
,
new
{ controller =
"Feature"
, action =
"Index"
, id = (
string
)
null
}
);
}
Important: We recommend that you register all your routes with a prefix, to differentiate them from the ones used by Sitefinity CMS. There are a lot of internal routes for system features (workflow, authentication, etc.), and this is the best way to avoid clashes. If you want to register routes that start from the root of the application, we recommend using For developers: Pure MVC mode.
In the registration itself, the only difference with a regular ASP.NET MVC project is that we use Bootstrapper.MVC instead of RouteTable. This is required to let Sitefinity CMS know about your custom route and avoid duplications. Custom routes will always have to come after Sitefinity CMS routes. For more information, read For developers: MVC modes and ASP.NET Routing on MSDN.