Hi everyone, I would really appreciate some help debugging this routing issue. Basically
/manual/nikon - *Doesnt work*
/manual/nikon/foo - *works*
/manual/nikon/foo/bar - *works*
/manual/nikon/foo/bar/download - *works*
But I cant for the life of me fathom what the problem is. Originally I had
the manufacturer_name as optional, but alas this didnt fix the problem
either. Below are my routes:
'manual' => array(
'type' => 'Zend\Mvc\Router\Http\Literal',
'options' => array(
'route' => '/manual',
'defaults' => array(
'controller' => 'Application\Controller\Manual',
'action' => 'index'
)
),
'may_terminate' => true,
'child_routes' => array(
'manufacturer' => array(
'type' => 'Zend\Mvc\Router\Http\Segment',
'options' => array(
'route' => '/:manufacturer_name',
'constraints' => array(
'manufacturer_name' => '[a-z0-9-]+'
),
'defaults' => array(
'action' => 'manufacturer'
)
),
'may_terminate' => true,
'child_routes' => array(
'category' => array(
'type' => 'Zend\Mvc\Router\Http\Segment',
'options' => array(
'route' => '/:category_name',
'constraints' => array(
'category_name' => '[a-z0-9-]+'
),
'defaults' => array(
'action' => 'category'
)
),
'may_terminate' => true,
'child_routes' => array(
'model' => array(
'type' =>
'Zend\Mvc\Router\Http\Segment',
'options' => array(
'route' => '/:model_name',
'constraints' => array(
'model_name' => '[a-z0-9-]+'
),
'defaults' => array(
'controller' =>
'Application\Controller\Manual',
'action' => 'model'
)
),
'may_terminate' => true,
'child_routes' => array(
'download' => array(
'type' =>
'Zend\Mvc\Router\Http\Literal',
'options' => array(
'route' => '/download',
'defaults' => array(
'controller' =>
'Application\Controller\Download',
'action' => 'index'
)
)
)
)
)
)
)
)
)
)
)
Any help would be greatly appreciated!
Thanks
Ben
--
View this message in context:
http://zend-framework-community.634137.n4.nabble.com/ZF2-segment-routing-tp4660110.html
Sent from the Zend Framework mailing list archive at Nabble.com.
--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]
