Not sure why the routes are doing that - I have done similar in 1.1
that worked.
Here is what I have used in a non-cake app before
function index($param = null){
if ($param && method_exists($this, $param) {
call_user_function(array($this, $param));
} else {
// do normal action
}
}
Might help as a workaround.
Geoff
--
http://lemoncake.wordpress.com
On Jul 20, 12:42 pm, hks <[EMAIL PROTECTED]> wrote:
> I've got a default action, index, that gets a list of names starting
> with an alphabet. The parameter defaults to 'A'
> eghttp://some.com/controller/ will list all names starting with letter
> Ahttp://some.com/controller/index/E will list those starting with
> letter E
>
> Now i would likehttp://some.com/controller/Eto work the same
> ashttp://some.com/controller/index/E
> but at the same time, functions defined in the controller should work
> too. ie.http://some.com/controller/everyoneshould call the function
> everyone()
>
> I could create functions A() through Z() in the controller, but I
> thought it might get lengthy.
>
> I've tried using Router::connect('/controllers/*', array('controller'
> => 'controllers', 'action' => 'index'));
> But the other actions don't work anymore
>
> Would be nice if there're some features I could use
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---