Cakephp 2 Admin Lte Theme Implementation

Recently I got the task to implement Admin Lte theme in my Cakephp project.

Althoough I have implement it before in Cakephp Version 3 but this time I had to implement it in Cakephp Version 2. 

I thought that it would be quite an easy task and searched for the Admin lte theme implementation in Cakephp 2.

But I didn't got any perfect solution . Sometimes the way of explaining just confused me.

After so much of finding I got the solution and I am writing down the steps so in case someone else is into this situation can easily implement it.

Feel free to comment.


Steps:

1. Create a folder named as "Themed" in your  "/app/View" Directory.
2. Now download this  https://github.com/sherwinrobles/CakeAdminLTE from the  link.
3. Now you will find "/app/View/Themed/CakeAdminLTE" folder there just copy this folder and paste it into your "/app/View/Themed" directory.
4. Now If you want to use this theme in  your Entire project then just open the
    AppController.php and paste the following code there.
                  

                   class AppController extends Controller {
                                   public $theme = "CakeAdminLTE";
                      }

    

      Or if you want it in your particular controller then use :
               

                       class TestController extends AppController {
                                public $theme = "CakeAdminLTE";
                                public function index(){
                                 }

                    }

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
5. Now open Your project in Browser and "Boom" theme loaded.

Comments :

Post a Comment