marcis <[EMAIL PROTECTED]> napisał(a):
> How do you think it could be done? Through routing? Rewriting the
> dispatch method (Zend_Controller_Front or
Zend_Controller_Dispatcher_Standard)?
> Any idea? Thanks in advance!!
>
> I tried it creating a new route (I was using the standard one) like this:
>
> $router->addRoute(
> 'families',
> new Zend_Controller_Router_Route('families/:action/*',
> array('module' => 'default', 'controller' => 'categories', 'action'
> =>
> 'index'))
> );
Try this one instead:
$router->addRoute(
'families', new Zend_Controller_Router_Route(':type/:action/*',
array('module' => 'default', 'controller' => 'categories', 'action' =>
'index'))
array('type' => '(categories|families)')
);
This way you will have 'type' parameter in your actions ready for inclusion
in database queries.
> And it worked BUT now it generates URIs like:
>
> /families/edit/controller/categories/id/4
>
> I can't understand why it's including 'controller' parameter. Can anyone
> help me, please?
It probably shouldn't - could you create a Jira issue for this?
--
Michał
--
Martel Valgoerad aka Michal Minicki | [EMAIL PROTECTED] |
http://aie.pl/martel.asc
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
"Idleness is not doing nothing. Idleness is being free to do anything."
-- Floyd Dell