Routes and admin module

Topics: Writing modules
Apr 12, 2011 at 8:17 PM

Hi could someone explain how the routing works wrt to a module which includes an admin element? It looks like there is some sort of convention at work for naming the controller - does it have to be AdminController? I want to setup a routes file which routes to my controller eg. map the route: /admin/packages/create to the create action in the PackagesController. I cant seem to get this working.  

Sorry if this is documented somewhere but I cant find anything on it.

thanks
Nic

Coordinator
Apr 12, 2011 at 9:19 PM

You can put an [Admin] attribute on your controller. As for routing, you can follow the example of any of the Routes.cs files.

Apr 13, 2011 at 11:02 AM

Thanks, it was the attribute I was missing!

On 12 Apr 2011 22:19, "bertrandleroy" <notifications@codeplex.com> wrote:
> From: bertrandleroy
>
> You can put an [Admin] attribute on your controller. As for routing, you can follow the example of any of the Routes.cs files.
>
>