Hi, sorry for the late reply.

The rules together seem to do the trick, everything works as I expect,
thanks for your help.

Felix

On 10 September 2010 18:49, cricket <zijn.digi...@gmail.com> wrote:
> On Fri, Sep 10, 2010 at 3:55 AM, Felix <fe...@felixfennell.co.uk> wrote:
>> Hi - just a quick question,
>>
>> I have a controller called terms with two normal actions (index, view)
>> and four prefixed actions (protected_index, protected_add,
>> protected_edit, protected_delete). However I want to use a alias
>> (glossary) so if I visit 'example.com/glossary' cake goes to
>> 'example.com/terms/index' and if I go to 'example.com/protected/
>> glossary/add' cake goes to 'example.com/protected/terms/add'.
>>
>> This seems quite simple, I found this in the cook book:
>>
>> Router::connect(
>>    '/cooks/:action/*', array('controller' => 'users', 'action' =>
>> 'index')
>> );
>>
>> Where 'cooks' is an alias for the 'users' controller. So I tried to
>> use:
>>
>> Router::connect('/glossary/:action/*', array('controller' => 'terms',
>> 'action' => 'index'));
>>
>> But two things don't work:
>>
>> 1 - if I go to 'example.com/glossary' I get a missing controller
>> error. (I thought it would go to 'example.com/terms/index'.
>
> Because that route expects an action, which you didn't provide. But,
> as you want any action to go to index, you can do:
>
> '/glossary/*',
> array('controller' => 'terms', 'action' => 'index')
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to