0
我有四個child_routes調用相同的控制器和操作。路線中的標準參數
'noticia' => array( 'type' => 'Segment', 'options' => array( 'route' => 'noticia[/:slug]', 'constraints' => array( 'controller' => '[a-zA-Z][a-zA-Z0-9_-]*', 'action' => '[a-zA-Z][a-zA-Z0-9_-]*', ), 'defaults' => array( '__NAMESPACE__' => 'Application\Controller', 'controller' => 'Post', 'action' => 'index', ), ), ), 'dica' => array( 'type' => 'Segment', 'options' => array( 'route' => 'dica[/:slug]', 'constraints' => array( 'controller' => '[a-zA-Z][a-zA-Z0-9_-]*', 'action' => '[a-zA-Z][a-zA-Z0-9_-]*', ), 'defaults' => array( '__NAMESPACE__' => 'Application\Controller', 'controller' => 'Post', 'action' => 'index', ), ), ), 'ovarejao' => array( 'type' => 'Segment', 'options' => array( 'route' => 'o-varejao[/:slug]', 'constraints' => array( 'controller' => '[a-zA-Z][a-zA-Z0-9_-]*', 'action' => '[a-zA-Z][a-zA-Z0-9_-]*', ), 'defaults' => array( '__NAMESPACE__' => 'Application\Controller', 'controller' => 'Post', 'action' => 'index', ), ), ), 'servicos' => array( 'type' => 'Segment', 'options' => array( 'route' => 'servicos[/:slug]', 'constraints' => array( 'controller' => '[a-zA-Z][a-zA-Z0-9_-]*', 'action' => '[a-zA-Z][a-zA-Z0-9_-]*', ), 'defaults' => array( '__NAMESPACE__' => 'Application\Controller', 'controller' => 'Post', 'action' => 'index', ), ), ),
我需要的是傳遞一個參數,以便我可以區分這些路線。怎麼做?