Dynamic routes

Topics: Customizing Orchard, General
Aug 11, 2012 at 5:36 AM


I'm new to orchard and just giving the CMS a trial to see if its suitable for my requirements, I'm actually a Umbraco user but been stung a bit recently with them axing version 5.

What I have is a scenario where I need to have completely dynamic urls which are checked by a bespoke handler to see if it needs to be handled by a custom module, and if that does not find content to serve it then falls back to the default orchard routes and looks for content.

The urls for the product list could be various levels deep i.e.




These will all be looked up in my separate product database, to establish if it finds a match. Because of the variety of url formats it literally needs a complete catch all of requests going to my handler, then if nothing gets found it then it uses the orchard routes to see if there is any matching content in the CMS.

This is similar to how my approach would work:


Is this something that would be easy to do? does anyone have any examples or anything that could help me test this out?


Aug 16, 2012 at 6:13 AM

Is that a no? too complex? any thoughts at all on alternatives etc?

Aug 17, 2012 at 4:13 AM

Have you looked into IRouteProvider?  You could probably add a high priority catch all route with a route constraint that checked to see if the path is in your database.

Aug 21, 2012 at 8:41 PM

Orchard is MVC, plus lots of bonuses. So this and much more is absolutely possible. MVC has routes, route constraints, etc, that you should look at.