Loading up ExtJS 4 into a CakePHP 1.3 project
I am just learning how to use CakePHP and because i usually use ExtJS in my projects i was looking on information on how to accomplish the task to setup a single page ExtJS application project in Cake.
I found several ways of doing this. But i will keep it simple. I am using CakePHP 1.3 (stable) and the newly released ExtJS 4, so here it is:
1.- I uploaded bootstrap.js, ext-all.js and ext-all-debug.js to webroot/js directory.
2.- I uploaded the css and resources/themes/images to the webroot, so all css files were uploaded into css directory and we created the themes directory into the CakePHP webroot.
3.- I created a simple default.ctp layout into views/layouts with the following contents:[codebox 1]
I have used UTF-8 into the Content/Type(for text encoding), because i am in latinamerica, but if you don’t use it just remove that line
4.- Then i have included my application into the webroot/js directory and created a home.ctp page into views/pages with the following contents:[codebox 2]
Thats all, Now i have my application running in a single page in home directory into the CakePHP project.
I will post how to use the ajax features and a custom Json View on all calls into CakePHP when i find a good way to do it. There are several ways outthere but are outdated so i will have to continue learning CakePHP and follow a good way to do it.
Until next time!