Most easy way to do this is by the use of scaffold variable.
Open the controller for which you want to make different admin page
and add the following statement:
public $scaffold='admin';
Now to go to app /config/core.php
and add the following statement:
Configure::write('Routing.prefixes', array('admin'));
Now create function for admin in controller like
public function admin_index(){
}
Now you access your admin using http://www.domain.com/admin/controller_name
and site using http://www.domain.com/controller_name
Open the controller for which you want to make different admin page
and add the following statement:
public $scaffold='admin';
Now to go to app /config/core.php
and add the following statement:
Configure::write('Routing.prefixes', array('admin'));
Now create function for admin in controller like
public function admin_index(){
}
Now you access your admin using http://www.domain.com/admin/controller_name
and site using http://www.domain.com/controller_name
No comments:
Post a Comment