Plugin Routes.yaml

Hi all,

how do i need to write the Routes.yaml for a neos plugin (TYPO3.Neos:Plugin) if i want to keep the base url? The plugin was inserted as a content element (over the neos backend) …

-
  name: 'My.ProductModul'
  uriPattern: '{node}/{@action}'
  defaults:
    '@controller': 'Standard'
    '@package': 'My.ProductModul'
  appendExceedingArguments: TRUE

The indexAction (first view, defined by ts2)

prototype(My.ProductModul:Plugin) < prototype(TYPO3.Neos:Plugin)
prototype(My.ProductModul:Plugin) {
      package = 'My.ProductModul'
      controller = 'Standard'
      action = 'index'
}

seems to be fine, but if i open another view i got unreadable links. for example:

< f:link.action package="my.productmodul" controller="standard" action="show">test

Thanks.

https://www.stephan-meier.com/schoene-urls-mit-typo3-neos/

## Add this part at top in Neos Configuration/Settings.yaml
#-
#  name: 'My.ProductModule'
#  uriPattern: ''
#  subRoutes:
#    'ProductSubroutes':
#      package: 'My.ProductModule'

## Add this part at your plugin Configuration/Settings.yaml
-
  name: 'Show Route'
  uriPattern: '{node}/show/{--my_productmodule-plugin.product}.{@format}'
  defaults:
    '@package': 'TYPO3.Neos'
    '@controller': 'Frontend\Node'
    '@format': 'html'
    '@action': 'show'
    '--my_productmodule-plugin':
      '@package': 'My.ProductModule'
      '@controller': 'Product'
      '@action': 'show'
      '@format': 'html'
  routeParts:
    node:
      handler: TYPO3\Neos\Routing\FrontendNodeRoutePartHandler
    '--my_productmodule-plugin.product':
      objectType: '\My\ProductModule\Domain\Model\Product'
      uriPattern: '{title}'
  appendExceedingArguments: TRUE
1 Like