Skip to content
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

Merged
merged 3 commits into from
Dec 20, 2016
Merged

!!! TASK: Load Neos Routes from settings #1343

merged 3 commits into from
Dec 20, 2016

Conversation

bwaidelich
Copy link
Member

@bwaidelich bwaidelich commented Dec 20, 2016

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.

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 global Configuration
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:

Neos:
  Flow:
    mvc:
      routes:
        'Neos.Neos':
          variables:
            'defaultUriSuffix': ''

(an empty string will remove the suffix)

Resolves: #1342
Related: neos/flow-development-collection#789

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
@mention-bot
Copy link

@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'
Copy link
Contributor

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?

Copy link
Contributor

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

@aertmann
Copy link
Contributor

#1305 takes care of removing media browser routes as well

@aertmann
Copy link
Contributor

mvc:
routes:
'Neos.Neos':
position: 'start'
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about defaultUriSuffix?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@bwaidelich bwaidelich changed the title TASK: Load Neos Routes from settings !!! TASK: Load Neos Routes from settings Dec 20, 2016
@kdambekalns kdambekalns merged commit c41e21e into neos:master Dec 20, 2016
beheist pushed a commit to beheist/neos-development-collection that referenced this pull request Jan 11, 2017
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Neos subroutes via Settings
5 participants