TYPO3 9.5:RealURL 迁移 - postVarSets - Extbase RouteEnhancer

TYPO3 9.5: RealURL Migration - postVarSets - Extbase RouteEnhancer

我有以下 RealURL 配置(部分):

`'postVarSets' => array(
    '_DEFAULT' => array(
             'level1' => array(
                 array(
                   'GETvar' => 'tx_bitproducts_productview[industryLevel1]',             
                     'lookUpTable' => array(
                         'table' => 'tx_bitproducts_domain_model_industry',
                         'id_field' => 'uid',
                         'alias_field' => 'industriename',
                         'addWhereClause' => ' AND NOT deleted ', 
                         'useUniqueCache' => 1,
                         'useUniqueCache_conf' => array(
                             'strtolower' => 1,
                             'spaceCharacter' => '-'
                         ),
                     )
                 ),
             ),
            'level2' => array(
              array(
                  'GETvar' => 'tx_bitproducts_productview[industryLevel2]',
                  'lookUpTable' => array(
                      'table' => 'tx_bitproducts_domain_model_industrylevel2',
                      'id_field' => 'uid',
                      'alias_field' => 'name',
                      'addWhereClause' => ' AND NOT deleted ', 
                      'useUniqueCache' => 1,
                      'useUniqueCache_conf' => array(
                          'strtolower' => 1,
                          'spaceCharacter' => '-'
                      ),
                  ),
              ),
          ),
...`

这导致了类似

的 URL

.../level1/automotive/

.../level2/wheels/

全部由一个 Extbase 控制器操作处理。 TYPO3 9 的 Extbase RouteEnhancer 会是什么样子?我会在这些字段中使用 Slug TCA。

感谢任何提示!

您的示例的可能配置如下所示:

routeEnhancers:
  BitProducts:
    type: Extbase
    extension: BitProducts (or something like that, depends how called your extension)
    plugin: Productview (or something like that, depends how called your plugin)
    routes:
      - { routePath: '/level1/{level1}', _arguments: {level1: 'industryLevel1'} }
      - { routePath: '/level2/{level2}', _arguments: {level2: 'industryLevel2'} }
    defaultController: 'Controller::action'
    aspects:
      level1:
        type: PersistedAliasMapper
        tableName: 'tx_bitproducts_domain_model_industry'
        routeFieldName: 'slug'
      level2:
        type: PersistedAliasMapper
        tableName: 'tx_bitproducts_domain_model_industrylevel2'
        routeFieldName: 'slug'