1.1 KiB
1.1 KiB
Routing
This section is related to TYPO3 v9.5.0 LTS, which introduces routing into the TYPO3 core.
An example for the example extension looks like:
routeEnhancers:
ExamplePlugin:
type: Extbase
extension: ExampleExtension
plugin: Address
defaultController: 'Address::index'
routes:
-
routePath: '/edit/{address}'
_controller: 'Address::edit'
_arguments:
'address': 'address'
-
routePath: '/update'
_controller: 'Address::update'
aspects:
address:
type: PersistedPatternMapper
tableName: 'tx_exampleextension_domain_model_address'
routeFieldPattern: '^(?P<company_name>.+)-(?P<uid>\d+)$'
routeFieldResult: '{company_name}-{uid}'
This defines two routed, one for edit and one for update. Also there is no cHash in URls due to the configuration. The address is replaced by company name and uid within the url.