Thanks Michał, but it doesn't work. It never ends loading the page... :(

And I think it wouldn't be appropiate because ALL the controllers will redirect 
to 'categories', right?

I'll report it.

Bye,
 
Marcos Gil Fuertes
[EMAIL PROTECTED]

----- Mensaje original ----
De: Michał Minicki <[EMAIL PROTECTED]>
Para: marcis <[EMAIL PROTECTED]>; [email protected]
Enviado: viernes, 1 de febrero, 2008 9:11:17
Asunto: Re: [fw-general] Alias for controller

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







       
______________________________________________ 
¿Con Mascota por primera vez? Sé un mejor Amigo. Entra en Yahoo! Respuestas 
http://es.answers.yahoo.com/info/welcome

Reply via email to