Last active
December 18, 2015 22:30
-
-
Save johannessteu/d8ab09f94bb68f0f89ab to your computer and use it in GitHub Desktop.
Neos Plugin Routes.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prototype(Vendor.Name:FooPlugin) < prototype(TYPO3.Neos:Plugin) | |
prototype(Vendor.Name:FooPlugin) { | |
package = 'Vendor.Name' | |
controller = 'Standard' | |
action = 'index' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Hi Benjamin,
my gist is about a Routes.yaml for a plugin/pluginview. I don't think you can exclude some nodes from your tree in the url at the moment like you can do in e.g. in realurl on TYPO3 CMS. You could probably send in a feature request at https://jira.typo3.org
Johannes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dear Johannes Steu,
could you please explain how to set an alternative route for an existing page/node?
For example i have this Page-Structure:
And i want to access Product 1-1 just like http://host.com/productgroup-1/product-1-1.
Could you please explain how to set this up?
Blessings
Benjamin Klix