Instead of:

$front = Zend_Controller_Front::getInstance();

Try:

$this->bootstrap('front');
$front = $this->getResource('front');

It may be that your front controller is reset when it is initialized (an
empty router may be injected). Not sure about this but it's worth a try.

Also, there is a built-in resource for the router that might be easier to
work with. Try commenting out your _initRouter() bootstrap method and adding
these lines to your application.ini:

resources.router.routes.wedding.type = "Zend_Controller_Router_Route"
resources.router.routes.wedding.route = "products/wedding/:year/:month/:day"
resources.router.routes.wedding.defaults.controller = "products"
resources.router.routes.wedding.defaults.action = "wedding"
resources.router.routes.wedding.reqs.year = "\d+"
resources.router.routes.wedding.reqs.month = "\d+"

I hope this helps.

--
Hector


On Tue, Mar 23, 2010 at 11:16 AM, zeliboba <[email protected]> wrote:

>
> Sorry, mistake in description. Right name of controller is 'products'.
> Current url is:
> http://localhost/products/wedding/year/2009/month/10/day/12
> Needed is:
> http://localhost/products/wedding/2009/10/12
> --
> View this message in context:
> http://n4.nabble.com/Default-router-still-goes-ahead-of-custom-tp1679098p1679485.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>

Reply via email to