Issues

ZF-1197: Route::assemble should strip right side URL parts which are equal to defaults

Description

{{Route::assemble}} return default action and controller names. Example: default route {{:controller/:action/*}} If action default, controller default and params empty {{assamble}} may return empty url. If action default and params empty {{assamble}} may return only controller.

Comments

Assign to Matthew.

Assigning to Martel

Assemble method uses route defaults already. See unit tests.

If you have meant something else by that please provide working code sample explaining what you want to accomplish.

Ok, after re-thinking it I guess I understandyour meaning now. You wish Zend_Controller_Router_Route to act similarly to Zend_Controller_Router_Route_Module - not to add parts to resulting URL when parameters ar marked as defaults, ie. when they're not required. Reopenning.

bug is still actual in version 1.9.

 
resources.router.routes.promo.type = "Zend_Controller_Router_Route"
resources.router.routes.promo.route = "promo/:action/*"
resources.router.routes.promo.defaults.module = "promo"
resources.router.routes.promo.defaults.controller = "index"
resources.router.routes.promo.defaults.action = "index"
 
$this->view->url(array(
                'module'=>'promo',
                'controller'=>'index',
                'action'=>'test',
                'par'=>'value'
            ),
            'promo',true)

I get: /promo/test/module/promo/controller/index/par/value I want: /promo/test/par/value