[FEATURE] Make prepending slash in TCA slug configurable
A new TCA option for TCA type "slug" is added, called "prependSlash", which adds a "/" in front of the field. For pages (pages.slug), this is mandatory and cannot be configured, as the slug field has to be filled and set to "/" as a base for the root page. For other database fields, this is optional (and disabled by default), and can be enabled via "prependSlash" in TCA config. This option is mostly useful for recursive records, like categories, but for most "flat" structures like "news" or "events", this is not suitable. For pages, it is hard-coded and cannot be (un-)set. Resolves: #86457 Releases: master Change-Id: I997908ed74af7ca21873b0793674e9185cc581ce Reviewed-on: https://review.typo3.org/58474 Tested-by:TYPO3com <no-reply@typo3.com> Reviewed-by:
Oliver Hader <oliver.hader@typo3.org> Tested-by:
Oliver Hader <oliver.hader@typo3.org> Reviewed-by:
Jörg Bösche <typo3@joergboesche.de> Reviewed-by:
Jigal van Hemert <jigal.van.hemert@typo3.org> Tested-by:
Jigal van Hemert <jigal.van.hemert@typo3.org>
Showing
- typo3/sysext/core/Classes/DataHandling/SlugHelper.php 26 additions, 5 deletionstypo3/sysext/core/Classes/DataHandling/SlugHelper.php
- typo3/sysext/core/Documentation/Changelog/master/Feature-86457-TCATypeSlugAddsAPrependingSlash.rst 43 additions, 0 deletions.../master/Feature-86457-TCATypeSlugAddsAPrependingSlash.rst
- typo3/sysext/core/Tests/Unit/DataHandling/SlugHelperTest.php 169 additions, 16 deletionstypo3/sysext/core/Tests/Unit/DataHandling/SlugHelperTest.php
Please register or sign in to comment