How can I pass the complete path arguments to a route defined in a mymodule.routing.yml file?
example_archive.content_archiv: path: '/examplearchiv/{myvalue}' defaults: _controller: 'Drupalexample_archivControllerexampleArchiveController::content_archiv' _title: 'example Archive' requirements: _access: 'TRUE' myvalue: .+
For example:
-
/examplearchiv/testvalue gives $myvalue = ‘testvalue’ to the controller
-
/examplearchiv/testvalue/value1 causes a “page not found” error
-
/examplearchiv/testvalue/value1/value2 causes a “page not found” error
According to http://symfony.com/doc/current/routing/slash_in_parameter.html myvalue: .+
should also return slashes for {myvalue}; $myvalue
should be 'testvalue/test1'
.
Sponsored by SupremePR