Autoroute with content Title (not slug)

Topics: Core, General
Jul 1, 2014 at 12:53 PM
I'm trying to create a contenttype with Autoroute part where the pattern is automatically generated.

I copied the definition from Blog and tried changing the {Content.Slug} to {Text.UrlEncode} but this doesn't seem to affect the url. It still goes to '/mytypes/mycustom-item' where the title is 'mycustom.item' (including a dot).

I have no idea what's going on with these tokens. Is it possible to use built-in tokens to achieve my goal?
                cfg => cfg
                        builder => builder
                        .WithSetting("AutorouteSettings.AllowCustomPattern", "false")
                        .WithSetting("AutorouteSettings.AutomaticAdjustmentOnEdit", "true")
                        .WithSetting("AutorouteSettings.PatternDefinitions", "[{Name:'Title', Pattern: 'mytypes/{Text.UrlEncode}', Description: 'title'}]")
                        .WithSetting("AutorouteSettings.DefaultPatternIndex", "0"))