Hi you all.

I'm new here and for ZF. I came here because I saw a lot of google search
result directing to here. =D

I have a problem i cannot solve for 2 days and i really read a lot of stuff
on the web and nothing.

Here is the problem:
I have 2 modules for my application: Website (default) and Admin (restrict
access).

I got this really easy with Ruby on rails, but with I could yet, but I want
my URL like this:

www.example.com (default)
www.example.com/pt-br/contato (language and some content with default)
www.example.com/en-us/admin (go to Admin module!)

I have my router configured:
(SitePrincipal = default and Gerenciador = Admin; cuz in Portuguese)

// Roteadores
$router = $frontController->getRouter();
$router->removeDefaultRoutes();

// roteador do módulo do gerenciador
$routeGerenciador = new Zend_Controller_Router_Route(
    ':language/gerenciador/:controller/:action/:codigo/*'
        ,
    array('language'   => $idiomaSigla
             ,'module'     => 'Gerenciador'
                 ,'controller' => 'index'
                 ,'action'     => 'index'
                 ,'codigo'     => ''
    )
);
$router->addRoute('RoteadorGerenciador', $routeGerenciador);

// roteador do módulo do site principal
$routeHome = new Zend_Controller_Router_Route(
        ':language/:action/*'
        ,
                array('language'   => $idiomaSigla
                         ,'module'     => 'SitePrincipal'
                         ,'controller' => 'index'
                         ,'action'     => 'index'
                )
        );
$router->addRoute('RoteadorPaginaPrincial', $routeHome);

$frontController->setRouter($router);

Testing:
http://localhost/ (works)

http://localhost/pt-br/gerenciador/noticia/
Gives me this expeption:
exception 'Zend_Controller_Action_Exception' with message 'Action
"gerenciador" does not exist and was not trapped in __call()' in
C:\Sites\simplesnet\php\Altona_Zend\lib\library\Zend\Controller\Action.php:474

I *really* don't get it is why the second link I gave don't match the first
router.

Thanks for any helps!
-- 
View this message in context: 
http://www.nabble.com/Config-the-router-for-modular-structure-and-multilingual-tp21387326p21387326.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to