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'.
2 - The routing prefix generates the same missing controller error.
I have set the routing prefix in core as such:
Configure::write('Routing.prefixes', array('protected'));
Basically I can't see why that doesn't work - have I missed something?
Any help would be appreciated
-- Felix
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 [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