On Feb 6, 9:15 am, sabkaraja <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have religously followed the routing examples by the masters. But I
> am not sure how and why its not working for me:
>
> controllers users and admin which work fine.
>
> #default action for users
> Router::connect('/users/', array('controller' => 'users', 'action' =>
> 'login'));
> #default action for admin
> Router::connect('/admin/', array('controller' => admin', 'action' =>
> 'login'));
>
> #some static pages need to be rerouted to /pages/view/param 
> (eg:http://website.com/about)
> Router::connect('/:action/', array('controller' => 'pages', 'action'
> => 'view'));
>
> #default action for / access
> Router::connect('/', array('controller' => 'pages', 'action' =>
> 'index', 'home'));
>
> However I get this error:
>
> Missing Method in PagesController
> Error: The action about is not defined in controller PagesController
> Error: Create PagesController::about() in file: app\controllers
> \pages_controller.php.

Your route explicitly states that /pages/x means look for the function
x in the pages controller, what you want (it seems) is a route for /*

Note that named parameters are not passed as arguments to functions.

hth,

AD
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to