Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save svparijs/34863e18cdf0ff769b67 to your computer and use it in GitHub Desktop.
Save svparijs/34863e18cdf0ff769b67 to your computer and use it in GitHub Desktop.
prototype(Vendor.Name:FooPlugin) < prototype(TYPO3.Neos:Plugin)
prototype(Vendor.Name:FooPlugin) {
package = 'Vendor.Name'
controller = 'Standard'
action = 'index'
}
#
# Put this in your global Routes.yaml
# !!! This must be included before the TYPO3 Neos-Routes
#
-
name: 'Foo routes'
uriPattern: '<VendorNameFooRoutes>'
defaults:
'@package': 'Vendor.Name'
'@format' : 'html'
subRoutes:
VendorNameFooRoutes:
package: Vendor.Name
#
# Put this in your packages Routes.yaml
#
-
name: 'Basic Route'
uriPattern: '{node}/custom-part/{--vendor_name-fooplugin.object}.{@format}'
defaults:
'@package': 'TYPO3.Neos'
'@controller': 'Frontend\Node'
'@format': 'html'
'@action': 'show'
'--vendor_name-fooplugin':
'@package': 'Vendor.Name'
'@controller': 'Standard'
'@action': 'index'
'@format': 'html'
routeParts:
node:
handler: TYPO3\Neos\Routing\FrontendNodeRoutePartHandler
'--vendor_name-fooplugin.object':
objectType: '\Vendor\Name\Domain\Model\Object'
uriPattern: '{name}'
appendExceedingArguments: TRUE
URL:
http://example.com/nodename.html?
--vendor_name-fooplugin[package]=vendor.name&
--vendor_name-fooplugin[controller]=standard&
--vendor_name-fooplugin[action]=index&
--vendor_name-fooplugin[object][__identity]=4de2cc9c-79c0-55e7-310e-91c5ae2fea19
should result in
http://example.com/nodename/custom-part/objectname.html
while objectname is dynamic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment