Header menu

_________________________________________________________________________________

Friday 6 September 2013

Create two different url for admin and front site in cakephp

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

No comments:

Post a Comment