-
-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
!!! TASK: Load Neos Routes from settings #1343
!!! TASK: Load Neos Routes from settings #1343
Conversation
This adjusts the Configuration to include Neos default routes via Settings. Background: Since version 3.1 Flow supports sub routes to be included via configuration (see http://flowframework.readthedocs.io/en/stable/TheDefinitiveGuide/PartIII/Routing.html#subroutes-from-settings). This is the recommended way to register routes as it provides greater flexibility. Note: Any existing `Routes.yaml` file in the global `Configuration` folder take precedence over routes loaded via Settings. Resolves: #1342 Related: neos/flow-development-collection#789
@bwaidelich, thanks for your PR! By analyzing the history of the files in this pull request, we identified @kdambekalns, @robertlemke and @johannessteu to be potential reviewers. |
mvc: | ||
routes: | ||
'Neos.Neos': | ||
position: 'start' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about the defaultUriSuffix variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And position: 'start'
seems to be breaking, custom routes, wich should always be loaded before neos subroutes should still be loaded before neos.neos
#1305 takes care of removing media browser routes as well |
mvc: | ||
routes: | ||
'Neos.Neos': | ||
position: 'start' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And position: 'start'
seems to be breaking, custom routes, wich should always be loaded before neos subroutes should still be loaded before neos.neos
@@ -560,6 +560,10 @@ Neos: | |||
applicationPackageKey: Neos.Neos | |||
applicationName: Neos | |||
|
|||
mvc: | |||
routes: | |||
'Neos.Neos': TRUE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about defaultUriSuffix
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
With version 4.0 Neos registers its own sub routes by default via configuration (see neos#1343). In order to change the "defaultUriSuffix" add the following to your `Settings.yaml`:: Neos: Flow: mvc: routes: 'Neos.Neos': variables: 'defaultUriSuffix': '' (an empty string will remove the suffix) Related: neos#1343
This adjusts the Configuration to include Neos default routes
via Settings.
Background:
Since version 3.1 Flow supports sub routes to be included via configuration
(see http://flowframework.readthedocs.io/en/stable/TheDefinitiveGuide/PartIII/Routing.html#subroutes-from-settings).
This is the recommended way to register routes as it provides greater flexibility.
Note: Any existing
Routes.yaml
file in the globalConfiguration
folder takeprecedence over routes loaded via Settings.
This change should not break existing installations, but it might lead to routes being loaded twice
or (in rare cases) in a different order.
To make sure, any existing
Routes.yaml
file should be removed from the globalConfiguration
folders and the respective routes should be loaded via Settings (see documentation above).
In order to change the "defaultUriSuffix" from Neos Routes, add the following to your
Settings.yaml
:(an empty string will remove the suffix)
Resolves: #1342
Related: neos/flow-development-collection#789