diff --git a/typo3/sysext/core/Documentation/Changelog/9.5.x/Feature-87085-FallbackOptionsForSlugFields.rst b/typo3/sysext/core/Documentation/Changelog/9.5.x/Feature-87085-FallbackOptionsForSlugFields.rst index 0fd9df24b020c0be3016967786548e61a9019b13..e6063d66e8223431f43324053c4fbe67fb51050b 100644 --- a/typo3/sysext/core/Documentation/Changelog/9.5.x/Feature-87085-FallbackOptionsForSlugFields.rst +++ b/typo3/sysext/core/Documentation/Changelog/9.5.x/Feature-87085-FallbackOptionsForSlugFields.rst @@ -18,7 +18,8 @@ configuration as nested array: 'slug' => [ 'config' => [ 'generatorOptions' => [ - 'fields' => ['nav_title', 'title'] + // use value of 'nav_title'. If 'nav_title' is empty, use value of 'title' + 'fields' => [['nav_title', 'title']] ] ] ], @@ -32,27 +33,36 @@ The fallback field can also be combined with other fields: 'slug' => [ 'config' => [ 'generatorOptions' => [ + // Concatenate path segments. In first segment, use 'nav_title' or 'title'. 'fields' => [['nav_title', 'title'], 'other_field'] ] ] ], ] +Hint +---- + +In this context: + +* :php:`['nav_title', 'title']` is the same as :php:`[['nav_title'], ['title']]` +* :php:`['nav_title', 'title']` is **not** the same as :php:`[['nav_title', 'title']]` + Examples -------- -+---------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| Configuration value | Values of an example page record | Resulting slug | -+=========================================================+======================================================================================================================================+===================================+ -|:php:`['nav_title', 'title']` | :php:`['title' => 'Products', 'nav_title' => '', 'subtitle' => '']` | `/products` | -+---------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -|:php:`['nav_title', 'title']` | :php:`['title' => 'Products', 'nav_title' => 'Best products', 'subtitle' => '']` | `/best-products` | -+---------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -|:php:`['subtitle', 'nav_title', 'title']` | :php:`['title' => 'Products', 'nav_title' => 'Best products', 'subtitle' => 'Product subtitle']` | `/product-subtitle` | -+---------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -|:php:`['nav_title', 'title'], 'subtitle'` | :php:`['title' => 'Products', 'nav_title' => 'Best products', 'subtitle' => 'Product subtitle']` | `/best-products/product-subtitle` | -+---------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -|:php:`['seo_title', 'title'], ['nav_title', 'subtitle']` | :php:`['title' => 'Products', 'nav_title' => 'Best products', 'subtitle' => 'Product subtitle', 'seo_title' => 'SEO product title']` | `/seo-product-title/products` | -+---------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +| Configuration value | Values of an example page record | Resulting slug | ++=================================================================+======================================================================================================================================+===================================+ +|:php:`[['nav_title', 'title']]` | :php:`['title' => 'Products', 'nav_title' => '']` | `/products` | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +|:php:`[['title', 'subtitle']]` | :php:`['title' => 'Products', 'subtitle' => 'Product subtitle']` | `/products` | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +|:php:`['title', 'subtitle']` or :php:`[['title'], ['subtitle']]` | :php:`['title' => 'Products', 'subtitle' => 'Product subtitle']` | `/products/product-subtitle` | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +|:php:`['nav_title', 'title'], 'subtitle'` | :php:`['title' => 'Products', 'nav_title' => 'Best products', 'subtitle' => 'Product subtitle']` | `/best-products/product-subtitle` | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +|:php:`['seo_title', 'title'], ['nav_title', 'subtitle']` | :php:`['title' => 'Products', 'nav_title' => 'Best products', 'subtitle' => 'Product subtitle', 'seo_title' => 'SEO product title']` | `/seo-product-title/products` | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ .. index:: TCA