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":
type = 'slug'
'valueFields' => ['a-field-from-the-same-table', 'another-field'], - special key "site-rootline"
'fieldSeparator' => '/' => (so you could do /year/month/title/uid')
'custom' => Userfunc?
- 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"
[FEATURE] Add a new TCA type "slug"
A new TCA type "slug" is added, which allows to generate a part of a URL
which can later be used for adding URL segments to any kind of record.
The new slug TCA type will be added to the pages database table separately
to fill a page with the rootline "Home => Products => My Product" with
"/products/my-product/details/" into the slug field when creating
a subpage "Details" under "My Product".
Once the slug field is added when persisting the record, changing a title
(like the page title) will not modify the slug anymore, but instead this
has to be modified separately.
- Add the TCA type "slug" to pages table
- Introduce an upgrade wizard for that pages table
- Improve FormEngine via AJAX validation of "uniqueInSite" for slugs
- Implement slug resolving for pages.
Tested-by: TYPO3com <firstname.lastname@example.org>
Reviewed-by: Oliver Hader <email@example.com>
Tested-by: Oliver Hader <firstname.lastname@example.org>
Reviewed-by: Christian Kuhn <email@example.com>
Tested-by: Christian Kuhn <firstname.lastname@example.org>