thanks for ur message
after i added this line i got following error please letme know what
to add in controller.php
Router::connect('/admin/',array
('controller'=>'administrators','action'=>'index','admin'=>'true','prefix'=>'admin'));
Router::connect('/admin/*',array
('controller'=>'administrators','action'=>'index','admin'=>'true','prefix'=>'admin'));
error :
Missing Controller
Error: Controller could not be found.
Error: Create the class Controller below in file: app\controllers
\controller.php
<?php
class Controller extends AppController {
var $name = '';
}
?>
Notice: If you want to customize this error message, create app\views
\errors\missing_controller.ctp
-------------------------------------------------------------------
On Dec 5, 9:12 pm, grigri <j...@hendersonwebdesign.com> wrote:
> The problem here is that cake doesn't know where to go with a plain
> 'admin/' route since there is no controller or action specified. You
> need to specify a default controller / action in the routes.php config
> file.
>
> If for example you wanted to have `/admin` be equivalent to `/admin/
> posts/latest/` then you would add this line:
>
> Router::connect('/admin/', array('controller' => 'posts', 'action' =>
> 'latest', 'prefix' => 'admin', 'admin' => true));
>
> hth
> grigri
>
> On Dec 5, 1:22 pm, dravid <dravidm...@gmail.com> wrote:
>
> > hello Cake PHP Group,
>
> > In one of our simple project using CAKE PHP (1.2) we tried to add
> > administrative pages and access based on admin user roles.
>
> > The problem is we are not able to view the page by simply entering
> > {URL to CAKE PHP}/admin/
> > instead we are only able to open the admin section when we enter
> > {URL to CAKE PHP}/admin/{Controller}/ or
> > {URL to CAKE PHP}/admin/{controller}/{action}
>
> > Anybody please help to configure this Admin Routing in routes.php and
> > steps to implement the admin routing.
>
> > For your reference, i am listing the steps what i did so far.
> > 1. I have take the comment in the app/config/core.php
> > Configure::write('Routing.admin', 'admin');
>
> > 2. Then added the following lines in the app/config/routes.php
> > Router::connect('/admin/:controller/:action/*', array
> > ('admin'=>'true','prefix'=>'admin',));
> > Router::connect('/admin', array('controller' => 'pages', 'action'
> > =>'index','admin'=>'true','prefix'=>'admin'));
>
> > 3. Then implemented the admin_index(), admin_login() etc., in the
> > 'administrators' controller.
>
> > 4. Then implemented the admin_index() function in the cake/libs/
> > controller/pages_controller.php
>
> > 5. Then implemented the admin_index.ctp file in the folder app/views/
> > pages/
>
> > 6. Then implemented the admin_index.ctp and admin_login.ctp in the
> > folders app/views/administrators/
>
> > The finall summary: the problem is we are not able to view the admin
> > actions by simply entering {URL to CAKE PHP}/admin/
>
> > Please help us to solve this issue in 'Route::connect()' so that we
> > can implement the role based page access.
>
> > Thanks in advance and looking forward for your reply.
>
> > With best regards
>
> > Dravid
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment