[!!!][TASK] Remove deprecated code from TableController
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Documentation / Changelog / 9.5 / Feature-86457-TCATypeSlugAddsAPrependingSlash.rst
1 .. include:: ../../Includes.txt
2
3 =======================================================
4 Feature: #86457 - TCA Type Slug adds a prepending slash
5 =======================================================
6
7 See :issue:`86457`
8
9 Description
10 ===========
11
12 The new TCA type slug field now hard-codes a slash as a prefix for all pages, as this is
13 mandatory for URL resolving and ensuring a uniqueness within a site.
14
15 However, for slug types within regular records, it is not necessary to do so, therefore, the slash
16 is never prepended on a "regular" slug field.
17
18 If - in some special cases - the "slug" field should contain a slash (due to e.g. nested categories
19 with speaking segments), a new option `prependSlash` is added to TCA type slug.
20
21
22 Impact
23 ======
24
25 Third-party extensions using the slug field now receive a slug value without a slash, and
26 can use this as a regular - sanitized - slug field. It is however recommended to use the
27 `uniqueInPid` eval option to ensure uniqueness.
28
29 If a nested record structure is given, it is recommended to use the new option `prependSlash`
30 by setting it to :php:`true`.
31
32 .. code-block:: php
33
34 'type' => 'slug',
35 'config' => [
36 'generatorOptions' => [
37 'fields' => ['title'],
38 ]
39 'fallbackCharacter' => '-',
40 'prependSlash' => true,
41 'eval' => 'uniqueInPid'
42 ]
43
44 .. index:: TCA