I'm working on a ZEND project and I have some issues with the router/routes. I hope someone can help me out!
I want the have these URL's:
The third segment in the URL will be a fixed text "formsend" or it will contain an ID, which is a number like '123456789'. URL 1 and 3 should both execute the
indexAction(), URL 2 must execute the
Now I have these route's setup to get URL 1 and 2 working:
return array( 'router' => array( 'routes' => array( 'contact' => array( 'type' => 'Segment', 'options' => array( 'route' => '/contact[/][:dns]', 'defaults' => array( '__NAMESPACE__' => 'project\Controller', 'controller' => 'Contact', 'action' => 'index', ), ), 'may_terminate' => true, 'child_routes' => array( 'send' => array( 'type' => 'Segment', 'options' => array( 'route' => '[/[:action[/]]]', 'defaults' => array( 'action' => 'send' ), ), ), ), ),
I have no idea how I must change my routes so I would be able to have segment_3 inside the
indexAction(). What do I need to change?