2010年10月7日星期四

[fw-mvc] Need some explanation on Router_Rewrite

Hi,

I try to automate the routes chaining when adding a locale into the URL.

Rather than iterate over all the routes for chaining locale route with each
route, i try to extend the Router_Rewrite to do it dynamically when a new
route is added.

My Rewrite class :

http://pastie.org/1204905

Into bootstrap:
protected function _initRoutes()
{
$this->bootstrap('FrontController');
$frontController = $this->getResource('FrontController');
$frontController->setRouter('Tight_Controller_Router_Rewrite');
}

All routes works well except for default routes.

e.g. if i try to reach "http://www.my-website.com/en-us/", i've got an error
with no direct relation with routes :

0: Plugin by name 'Excerpt' was not found in the registry; used paths:
App_View_Helper_: App/View/Helper/ Tight_View_Helper_: Tight/View/Helper/
Zend_View_Helper_:
Zend/View/Helper/;\helpers/;F:/PHPServer/Zend/Apache2/htdocs/my-website/app/web/front/views\helpers/


But if i try to reach "http://www.my-website.com/en-us/index/index", it
works well :)


I think the problem comes from the default route definition, i don't know
why exactly, and that's why i need you, but i feel i'm wrong here maybe
because of the initialisation order, or because the request is empty at this
time :p

Any thoughts ?


Thanks.

br,
Benjamin.
--
View this message in context: http://zend-framework-community.634137.n4.nabble.com/Need-some-explanation-on-Router-Rewrite-tp2966450p2966450.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: