2013/4/2 Ilya [via Zend Framework Community] <
[email protected]>
> 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?
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://zend-framework-community.634137.n4.nabble.com/First-optional-routing-segment-acts-as-mandatory-one-for-child-routes-tp4659601.html
> This email was sent by
> Ilya<http://zend-framework-community.634137.n4.nabble.com/template/NamlServlet.jtp?macro=user_nodes&user=374946>(via
> Nabble)
> To receive all replies by email, subscribe to this
> discussion<http://zend-framework-community.634137.n4.nabble.com/template/NamlServlet.jtp?macro=subscribe_by_code&node=4659601&code=Y29kZXI0QHdlYi1heGlvbWEucnV8NDY1OTYwMXw3OTY0NTQzMTA=>
>
--
View this message in context:
http://zend-framework-community.634137.n4.nabble.com/First-optional-routing-segment-acts-as-mandatory-one-for-child-routes-tp4659601p4659602.html
Sent from the Zend Framework mailing list archive at Nabble.com.