This project is read-only.

autoroute custom pattern using field value?

Topics: Customizing Orchard
Mar 6, 2012 at 7:52 AM

I have a custom content type with a Date Time field that allows date only named MeetingDate

I'd like to have a custom route on it that uses the MeetingDate field to display routes like this: 


I'm thinking something similar to this:


How do I do this with a custom autoroute pattern?

Mar 6, 2012 at 8:16 AM

From the top of my head that would be something like {ContentItem.Fields.YourContentType.MeetingDate...}

Mar 6, 2012 at 8:43 AM

Bertrand, thanks for the quick reply. That did not work and a few other variations didn't work. Any guidance on how I can figure this out?

Guessing, looking through the source code, shape tracing, documentation?

Mar 6, 2012 at 7:20 PM

{Content.Fields.YourContentType.YourField} ... but I am not sure there is a token for DateTimeField which would return the Date by default.

Let me create a work item for this.

Mar 6, 2012 at 7:21 PM

Mar 6, 2012 at 7:23 PM

Thanks for digging in sebastianros!

Dec 7, 2012 at 3:17 PM

I've tried doing this with a custom field. I'm using 1.6.


Shows up as


When I use


It shows the long version of 


Dec 8, 2012 at 11:14 PM

This should work. Looks like a regression. Please file a bug.

Dec 17, 2012 at 8:58 PM

Needed to use: