[Flow] Routing controllers placed in subfolders
Aske Ertmann
aske at moc.net
Tue Aug 27 10:25:47 CEST 2013
Hello Christian
Subfolder controllers is actually the concept of sub-packages which is handled by the Flow routing. There's not much documentation about it unfortunately, but you can see a bit here http://docs.typo3.org/flow/TYPO3FlowDocumentation/stable/TheDefinitiveGuide/PartIII/ModelViewController.html
There an example of it routing configuration here https://git.typo3.org/Packages/TYPO3.Flow.git/blob/HEAD:/Configuration/Routes.yaml#l62
Hope that helps
Aske
On 25/08/2013, at 16.39, Christian Eßl wrote:
> Hi,
>
> I have a Controller, that is placed in a subfolder like this: ./Controllers/Foo/BarController.php
>
> Because this controller is not handled by TYPO3 Flows default routing, I need to configure a route in my Routes.yaml
>
> Static Routes like this work fine:
>
> --------------------
> name: 'Foo\Bar'
> uriPattern: 'foo/bar/templatevariable(/{@action})'
> defaults:
> '@controller': 'Foo\Bar'
> '@action': 'index'
> ---------------------
>
> But Dynamic Routes like this don't get transformed at all:
>
> ---------------------
> name: 'Foo\Bar Dynamic'
> uriPattern: 'foo/bar/{bar}/{@action}'
> defaults:
> '@controller': 'Foo\Bar'
> routeParts:
> bar:
> objectType: Vendor\Package\Domain\Model\Foo\Bar
> uriPattern: '{title}'
> ---------------------
>
> Did I forget something in my Route config? This configuration works fine for me with controllers that aren't placed in a subfolder.
>
> Greetings,
> Christian
> _______________________________________________
> Flow mailing list
> Flow at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
More information about the Flow
mailing list