#84729Implement "slug" handling for pages and other records
Description
1. Create a new pages DB field “slug” (“URL path”)
2. Create a new TCA type “type=slug“
- FormEngine: renders an input field and validates against URI schemes (JS validation), prepends the current / configured site to get the full URL
- Also Consider (Copy 1) in pages etc. so they get a “1” and not a “-copy1“ Validate for “Uniqueness” on save (or before?)
- TCA type slug = ‘slug’
config [
‘valueFields’ => [‘a-field-from-the-same-table’, ‘another-field’], – special key “site-rootline“
‘fieldSeparator’ => ‘/’ => (so you could do /year/month/title/uid’)
‘custom’ => Userfunc?
]
Open topics:
- discuss if slugs always need a prepending or a appending slash?
- Should we still allow ?id=123 ?
3. Create a CLI command to create slugs for pages (or all TCA tables) – allow to migrate from realurl?
4. Create an upgrade wizard that does the same
5. Ensure that all pages within a site have a slug – possible?
6. Handle things like “moving a page to a different site”
Reviews 2
Subtasks 6
- Task #85937Generate default slug for entities not being submitted via FormEngine
- Task #85938Handle renaming of "base" property of a site
- Bug #85957Pages on root level cannot be created now
- Bug #86073Create url segment if localizing page
- Bug #86074Properly create slug if adding new pages via FormEngine
- Task #86077Add recreate button to slug field