Skip to content

Instantly share code, notes, and snippets.

@bwaidelich
Last active August 29, 2015 14:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bwaidelich/a75ed553fa3e0ffc1933 to your computer and use it in GitHub Desktop.
Save bwaidelich/a75ed553fa3e0ffc1933 to your computer and use it in GitHub Desktop.
Example routing setup for the "Flickr" Plugin of the TYPO3.NeosDemoTypo3Org package
-
name: 'Flickr: User stream'
uriPattern: '{node}/user/{--typo3_neosdemotypo3org-flickr.userId}.html'
defaults:
'@package': 'TYPO3.Neos'
'@controller': 'Frontend\Node'
'@action': 'show'
'@format': 'html'
'--typo3_neosdemotypo3org-flickr':
'@package': 'TYPO3.NeosDemoTypo3Org'
'@controller': 'Flickr'
'@action': 'userstream'
routeParts:
'node':
handler: 'TYPO3\Neos\Routing\FrontendNodeRoutePartHandlerInterface'
'--typo3_neosdemotypo3org-flickr.userId':
toLowerCase: false
-
# This is only added so that the back link from the user stream does not contain the plugin arguments
name: 'Flickr: Tag stream'
uriPattern: '{node}.html'
defaults:
'@package': 'TYPO3.Neos'
'@controller': 'Frontend\Node'
'@action': 'show'
'@format': 'html'
'--typo3_neosdemotypo3org-flickr':
'@package': 'TYPO3.NeosDemoTypo3Org'
'@subpackage': ''
'@controller': 'Flickr'
'@action': 'tagstream'
routeParts:
'node':
handler: 'TYPO3\Neos\Routing\FrontendNodeRoutePartHandlerInterface'
@bwaidelich
Copy link
Author

Include this before the default neos routes

@bwaidelich
Copy link
Author

Remove ".html" from the uriPatterns if that's your preferred URI scheme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment