Skip to content

Instantly share code, notes, and snippets.

@pumatertion
Created May 24, 2014 08:35
Show Gist options
  • Save pumatertion/1a12c0b784525c110193 to your computer and use it in GitHub Desktop.
Save pumatertion/1a12c0b784525c110193 to your computer and use it in GitHub Desktop.
#This walks into the main Routes.yaml in Flows Root Folder "Configuration"
-
name: 'Your Fantastic Name'
uriPattern: '<YourPackageSubroutes>'
subRoutes:
'YourPackageSubroutes':
package: 'YOUR.Package'
# This will contain your detailes routing for your controller "Registration" f.e. Its located in "Your.Package/Configuration"
# The defaults from the Routes.yaml (f.e. @action) will be overwritten here and getting the pattern "signup/do" instead of "your.package/create"
-
name: 'Sign up'
uriPattern: 'sign-up'
-
name: 'Registration'
uriPattern: 'sign-up/do'
defaults:
'@action': 'create'
appendExceedingArguments: TRUE
# This walks into you Package Routes.yaml of your package. it works as a "wrapper" wich uses, in this example, the file "Routes.Registration.yaml" wich is located next to "Routes.yaml" in the folder "Your.Package/Configuration"
-
name: 'RegistrationController'
uriPattern: '<RegistrationSubRoutes>'
defaults:
'@package': 'YOUR.Package'
'@controller': 'Registration'
'@action': 'index'
'@format': 'html'
subRoutes:
'RegistrationSubRoutes':
package: 'YOUR.Package'
suffix: 'Registration'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment