Re: Route problem. How to ignore the action name?

2006-09-06 Thread Martin Schapendonk
On 9/6/06, nate [EMAIL PROTECTED] wrote: Right, you need to hard-code a route for each action. I'm actually working on some Router enhancements that'll make this process a little easier. Would this include the possibility to provide separate routes for action names irrespective of the

Re: Route problem. How to ignore the action name?

2006-09-06 Thread nate
Yup, that should actually be possible with Cake 1.1. Just add something like this to routes.php: $Route-connect(/:controller/wijzig/*, array(action = edit)); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake

Re: Route problem. How to ignore the action name?

2006-09-05 Thread nate
This one should work: $Route-connect('/tags/*, array('controller' = tags, 'action' = 'view')); Then, in your action, you pick up the tag name as a parameter: function view ($tagName = null) { // } --~--~-~--~~~---~--~~ You received this message because

Re: Route problem. How to ignore the action name?

2006-09-05 Thread Fasthold
Thanks nate. Yes, this works for view action. But it doesn't work for add action any more, When I visit http://localhost/tags/add, it also redirect to view page. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake

Re: Route problem. How to ignore the action name?

2006-09-05 Thread Bert Van den Brande
Make sure you define the /tags/add route before the general /tags/* route in routings.php On 9/6/06, Fasthold [EMAIL PROTECTED] wrote: Thanks nate. Yes, this works for view action. But it doesn't work for add action any more, When I visit http://localhost/tags/add, it also redirect to view

Re: Route problem. How to ignore the action name?

2006-09-05 Thread nate
Right, you need to hard-code a route for each action. I'm actually working on some Router enhancements that'll make this process a little easier. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To

Re: Route problem. How to ignore the action name?

2006-09-05 Thread Fasthold
Bert Van den Brande 写道: Make sure you define the /tags/add route before the general /tags/* route in routings.php Yes, this works with $Route-connect('/tags/add', array('controller' = 'tags', 'action' = 'add')); and $Route-connect('/tags/*', array('controller' = 'tags', 'action' = 'view'));