Routes with ID instead of Slug?

Topics: General
Apr 15, 2011 at 4:32 PM

Is it possible to configure Orchard to use Routes like:

instead of

or do i have to create a module for such routes?



Apr 15, 2011 at 5:43 PM

If you use lists (Container and Containable parts) you will automatically get routes like /list-name/item-name

Apr 15, 2011 at 5:44 PM

Oh - I noticed you are saying Ids; well, you can set the slug to be whatever you want for items.

Apr 15, 2011 at 5:57 PM

You can also remove the routable part, if you really want ugly URLs. Actually I'm a little curious as to why why why you'd want to do that ;)

Apr 15, 2011 at 6:37 PM

I'll try that.

I want ugly URLs because I want to use Orchard to manage (hardware) things identified with barcodes and to make things easy I want to read a barcode and just redirect to something like :)


Apr 15, 2011 at 7:14 PM

You're better off creating your own part to store the barcode number, then setting up your own controller and route to handle the bar code Ids. The reason I say this is because you have no control over the Ids of content in Orchard anyway ;)