0
votes

I have the following part in my realURL-configuration in my TYPO 8.7 installation:

'locationConfiguration' => array(
    array(
        'GETvar' => 'continent',
        'valueMap' => array(
            'europe' => 1,
            'europa'=>1,
            'americas' => 2,
            'africa' => 4,
            'afrika' => 4,
            'amerika' => 2,
            'asia' => 3,
            'asien' => 3,
            ),
        'valueDefault' => '',
        'noMatch' => 'bypass',
        ),

'134' => 'locationConfiguration',

These are simple GetVars which I want to have translated. The argument "continent" is optional, so the final url should also work without this argument. As a Newbe in TYPO3 9.5 I wonder if this works with enahancer type "Simple Enhancer" and if I can combine this with "aspects".

Note: Its not an extbase plugin with Controller->Action etc. but an oldstyle plugin.

Could anybody post some sample, which meets the above configuration ?

Thanks a lot !

1
This is possible with an aspect map and locales. Please try to come up with some code to show some effort. Have you seen docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/9.5/… and docs.typo3.org/m/typo3/reference-coreapi/9.5/en-us/ApiOverview/… ?Jonas Eberle

1 Answers

0
votes

I finally found out how it works. There is another variable included at the same path-segment, but this should not matter to the solution. I used RouteEnhancer type "extbase" even though my plugin is not an extbase plugin and left out the part with controller/action (and it works without them):

  Locations:
type: Extbase
limitToPages:
  - 134
routes:
  - routePath: '/{src}'
  - routePath: '/{continent}'
  - routePath: '/{continent}/{src}'
defaults:
  src: ''
  continent: ''
aspects:
  src:
    type: StaticValueMapper
    map:
      bsc: bsc
      bpg: bpg
      big: big
      bpr: bpr
  continent:
    type: StaticValueMapper
    map:
       europe: 1
       americas: 2
       asia: 3
       africa: 4
    localeMap:
      - locale: 'de_.*'
        map:
          europa: 1
          amerika: 2
          asien: 3
          afrika: 4