[FLOW3-general] Sub folder in Controller
Bastian Waidelich
bastian at typo3.org
Fri Mar 15 15:49:59 CET 2013
Cornel Widmer wrote:
Hi Cornel,
> In my controller folder I want the subfolder "Administration" with many
> more controllers. [...]
> -
> name: 'Administration'
> uriPattern: 'administration\user'
> defaults:
> '@package': 'WS.Rico'
> '@controller': 'Administration/User'
> '@action': 'index'
Your uriPattern contains a backslash and the @controller default value a
forward slash. Try:
-
name: 'Administration'
uriPattern: 'administration/user'
defaults:
'@package': 'WS.Rico'
'@controller': 'Administration\User'
'@action': 'index'
A different solution would be the use of "SubPackages". For this to
work, the directory structure should be:
Classes
Your
Package
Controller
Administration
Controller
And the respective route:
-
name: 'Administration'
uriPattern: 'administration/user'
defaults:
'@package': 'WS.Rico'
'@subpackage': 'Administration'
'@controller': 'User'
'@action': 'index'
(untested)
Also, always make sure to check the log, it contains details about the
failing routes!
--
Bastian Waidelich
--
Core Developer Team
TYPO3 .... inspiring people to share!
Get involved: typo3.org
More information about the FLOW3-general
mailing list