Hi Marc,
If you are OK with accessing your controllers via URLs like
/application/tools/some-tool/action (with ModuleRouteListener), then adding
following route to module config file:
'routes' => array(
'application-tools' => array(
'type' => 'Literal',
'options' => array(
'route' => '/application/tools',
'defaults' => array(
'__NAMESPACE__' => 'Application\Controller\Tools',
'controller' => 'Index',
'action' => 'index',
),
),
'may_terminate' => true,
'child_routes' => array(
'default' => array(
'type' => 'Segment',
'options' => array(
'route' => '/[:controller[/:action]]',
'constraints' => array(
'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
),
'defaults' => array(
),
),
),
),
),
),
'controllers' => array(
'invokables' => array(
'Application\Controller\Tools\SomeTool' =>
'Application\Controller\Tools\SomeToolController',
// other controllers...
),
),
now it will try to load templates from view/application/tools/some-tool/
directory
Hope this will help you :-)
Mat
--
View this message in context:
http://zend-framework-community.634137.n4.nabble.com/Grouping-Controllers-in-dirs-tp4659568p4659569.html
Sent from the Zend Framework mailing list archive at Nabble.com.
--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]