[FLOW3-general] Sub folder in Controller
Bastian Waidelich
bastian at typo3.org
Mon Mar 18 10:00:16 CET 2013
Cornel Widmer wrote:
Hi Cornel,
> That doesn't work either. It shows an error that the controller action
> is not found in the default flow route.
It definitely works if you use the backslashes consistently, I use this
in several projects:
Controller:
<?php
namespace Your\Package\Controller\Administration;
class UserController extends \TYPO3\Flow\Mvc\Controller\ActionController {
public function indexAction() {
$this->redirect('test', 'Administration\User');
}
public function testAction() {
return 'it works!';
}
?>
Routes.yaml:
-
name: 'User administration'
uriPattern: 'administration/user(/{@action})'
defaults:
'@package': 'Your.Package'
'@controller': 'Administration\User'
'@action': 'index'
If you point the browser to "http://yourhost/administration/user" you
should be redirected to "http://yourhost/administration/user/test" and
see "it works!".
What exactly is the error message you get?
--
Bastian Waidelich
--
Core Developer Team
TYPO3 .... inspiring people to share!
Get involved: typo3.org
More information about the FLOW3-general
mailing list