Yeah that error makes sense and there is no way around it unless you modify
the PagesController which is probably not a good idea.
Try removing that CAKE_ADMIN from your route and doing the following in
AppController
if ($this->params["url"] == "admin") {
$this->params[CAKE_ADMIN] = true;
}
if (!empty($this->params[CAKE_ADMIN])){
// all your other stuff
}
just double check the url value as it might be "/admin"
Geoff
On 8/25/07, rtanz <[EMAIL PROTECTED]> wrote:
>
>
> Well i changed as you suggested (see below) however i am getting an
> error when i access /admin:
>
> Missing Method in PagesController
>
> You are seeing this error because the action admin_display is not
> defined in controller PagesController
>
> If you want to customize this error message, create app\views/errors/
> missing_action.thtml.
>
> Fatal: Confirm you have created the PagesController::admin_display()
> in file : app\controllers\pages_controller.php
>
> <?php
> class PagesController extends AppController {
> function admin_display() {
> }
> }
> ?>
>
> old
> //$Route->connect('/admin', array('controller' => 'Pages', 'action' =>
> 'display', 'admin'));
>
> new
> $Route->connect('/admin', array('controller' => 'Pages', 'action'
> =>'display', CAKE_ADMIN => CAKE_ADMIN));
>
> am i doing something wrong?
>
>
> >
>
--
http://lemoncake.wordpress.com
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---