Hi all!
I have the following routing definition
'admin_default' => array(
'type' => 'segment',
'options' => array(
'route' => '[/:lang]/administrator[/:module][/:action]',
'constraints' => array(
'lang' => '[a-zA-Z]{2}',
'module' => '[a-zA-Z0-9_-]*',
'action' => '[a-zA-Z0-9_-]*',
),
'defaults' => array(
'module' => 'Application',
'controller' => 'Admin',
'action' => 'index',
'lang' => 'ru'
),
),
'may_terminate' => true,
'child_routes' => array(
'wildcard' => array(
'type' => 'wildcard',
'may_terminate' => true,
'options' => array(
'key_value_delimiter' => '/',
'param_delimiter' => '/'
),
),
),
),
So, I can't get rid of segment [/:lang] in url string
For example:
Url view helper $this->url('admin_default', array('module' => 'albums'))
returns following url string:
/administrator/albums
while $this->url('admin_default/wildcard', array('module' => 'albums',
'action' => 'edit', 'id' => album_id_here)) returns
*/ru/*administrator/albums/edit/id/album_id_here
How can I remove [/:lang] segment from url string in second case?
--
View this message in context:
http://zend-framework-community.634137.n4.nabble.com/First-optional-routing-segment-acts-as-mandatory-one-for-child-routes-tp4659601.html
Sent from the Zend Framework mailing list archive at Nabble.com.
--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]