Open gwonen opened 2 years ago
I like it. This should be the default behavior. Maybe rerun the patterns on all parts that have patterns through a handler.
I'd prefer seeing the autoroute path displayed properly in the Razor view itself instead of using a handler. Maybe the work needs to be done in the driver itself.
The parts that need to be cleared should implement the localization handler. @gwonen do you want to try and create PR that would do that?
The parts that need to be cleared should implement the localization handler. @gwonen do you want to try and create PR that would do that?
I don't currently have a development environment set up where I can easily do this, but when I do and this hasn't been resolved yet I'll get back to it.
Is your feature request related to a problem? Please describe.
{{ ContentItem.Content.LocalizationPart.Culture }}/{{ ContentItem.DisplayText | slugify }}
and don't allow the user to regenerate or customize the path.en/display-text
en/display-text-1
instead offr/localized-display-text
Describe the solution you'd like
The item's route should be reset when localizing, so that it gets generated with the proper culture and display text. It seems this was discussed in #5083 but never implemented.
Describe alternatives you've considered
As a work-around you can allow the user to regenerate the route but that's not ideal, since the user has to remember to check the option every time they localize an item. Non-technical users might unintentionally break the URL with future edits.