hd77
(Christian Schwahn)
January 30, 2017, 5:05pm
1
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.
hd77
(Christian Schwahn)
January 31, 2017, 1:36pm
2
hd77
(Christian Schwahn)
January 31, 2017, 1:41pm
3
## 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