1 .. include:: ../../Includes.txt
3 ==============================================================
4 Feature: #86160 - PageTypeEnhancer for mapping &type parameter
5 ==============================================================
12 A new Route Enhancer is added to the newly introduced Routing functionality which allows to add
13 a suffix to the existing route (including existing other enhancers) to map a page type (GET parameter &type=)
16 It is now possible to map various page types to endings.
20 .. code-block:: typoscript
25 page.10.value = Default page
29 rssfeed.10 < plugin.tx_myplugin
30 rssfeed.config.disableAllHeaderCode = 1
31 rssfeed.config.additionalHeaders.10.header = Content-Type: xml/rss
36 jsonview.10.userFunc = MyVendor\MyExtension\Controller\JsonPageController->renderAction
37 jsonview.10.config.disableAllHeaderCode = 1
38 jsonview.10.config.additionalHeaders.10.header = Content-Type: application/json
40 Now configure the Route Enhancer in your site's :file:`config.yaml` file like this:
53 The :yaml:`map` allows to add a filename or a file ending and map this to a :ts:`page.typeNum` value.
55 It is also possible to set :yaml:`default` to e.g. ".html" to add a ".html" suffix to all default pages.
68 The :yaml:`index` property is used when generating links on root-level page, thus, instead of e.g. having
69 `/en/.json` thus would then result in `/en/index.json`.
74 The TYPO3 Frontend-internal `&type` parameter can now also be part of a speaking URL with a simple
75 line of configuration.
77 Please note that the implementation is a Decorator Enhancer, which means that the PageTypeEnhancer
78 is only there for adding suffixes to an existing route / variant, but not to substitute something
79 within the middle of a speaking URL segment.