URL and routing

Nov 26, 2013 at 3:32 PM
Hi! How I can call different views in this mvc module demo?
I don't undestand how URL and routing work here!
Thanks!
Coordinator
Dec 7, 2013 at 2:31 AM
Scippy,

Each module should implement an MVC controller, To call different views on that controller you just add action=myaction to the url or request params. This is how a multi view module would work. A single view module should have the controller as well as the action specified in the modules .cs file. A multiview module would be like a forum or product catalog and a single view module is like a widget or web part.

The bridge comes with some html helpers for creating links to other views or even other DNN pages. (DnnMvcBridge.Web.Mvc.Helpers)

Note the SingleViewControl.cs, the controllername and actionname properties are already set.

Compared to the ViewControl.cs where the actionname property is left empty so that the DnnMvcBridge knows to look for the action in the url, if it does not exist then it defaults to the index action of the assigned controller.

There is no routing, DNN does not support it.