I’ve recently come across CakePhp as an excellent framework and am currently porting over my site to cake. In terms of using JQuery, what is the currently recommended method for including the javascript / accessing the javascript files. Doing a little digging, some people have suggested a central place in app/config … what do you all think?
Thanks.
Add your javascript files including jquery to
/app/webroot/js/.Then on your layout (
/app/views/layouts/default.ctp), just use the javascript helper to load your javascript files.Make sure javascript helper is loaded on your app. Either on your
app_controller.phpor individual controllers.var $helpers = array('Html', 'Form', 'Javascript');