2008年8月7日星期四

Re: [fw-mvc] Again... routing problem

Hi,

I think you need to add the specific 2 routes,

because the basic route goes like this:
/:module/:controller/:action /...

so if you would insert the module in the url it would work,
but since you don't want that ( i guess from your story )

you need to add an extra route next to the default route
try this:

$realRoute = new Zend_Controller_Router_Route('real/:controller/:action');

$router = $frontController->getRouter();
$router->addRoute('real',$realRoute);

Patrick
from Naxholding.com

On Aug 7, 2008, at 4:49 PM, Václav Vaník wrote:


Hi guys,

I have unfortunately problem with modules routing.

I created 2 modules:

default
 IndexController
 FooController

real
 IndexController
 BooController

to bootstrap I added:

   $frontController = Zend_Controller_Front::getInstance();
   $frontController->addModuleDirectory(ROOT_DIR . '/app/www/modules');
   //folder is set right

and now examples:

http://test/ - works well, default module, controller index, action index
http://test/foo - works well, default modul, controller foo, action index

http://test/real - doesnt  work, module real, controller index, action index
http://test/real/boo - doesnt work, module real, controller boo, action
index

How could I correct this? I red zf manual, searched Google, I think its set
correctly.

Thx for help :)

Sorry for my english
--
View this message in context: http://www.nabble.com/Again...-routing-problem-tp18872222p18872222.html
Sent from the Zend MVC mailing list archive at Nabble.com.


没有评论: