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}'
    '@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


## 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}'
    '@package': 'TYPO3.Neos'
    '@controller': 'Frontend\Node'
    '@format': 'html'
    '@action': 'show'
      '@package': 'My.ProductModule'
      '@controller': 'Product'
      '@action': 'show'
      '@format': 'html'
      handler: TYPO3\Neos\Routing\FrontendNodeRoutePartHandler
      objectType: '\My\ProductModule\Domain\Model\Product'
      uriPattern: '{title}'
  appendExceedingArguments: TRUE
1 Like