Routes per feature

Topics: General, Writing modules
May 26, 2012 at 5:15 PM
Hello guys. Is it possible to activate routes in module based on module's activated features? Thank you.
May 26, 2012 at 5:44 PM

Yes, on the class declaring the routes, add an [OrchardFeature("YOURFEATURENAME")]. You will find lots of examples in the source code.

May 26, 2012 at 7:48 PM

You mean I can have as many classes as I want implementing IRouteProvider? As Routes1, Route2 etc?

May 27, 2012 at 5:43 AM

Yes, of course.

May 27, 2012 at 6:34 AM

Thank you guys.