I'm confused by this as I can't find good documentation on how to do this, I have a jquery file called "index" located in my cakephp site folder at:
/app/webroot/js/index.js
I am trying to include it in my view with:
<?php
echo $javascript->link('index', false);
?>
but I get:
Fatal error: Call to a member function link() on a non-object in /var/www/site1/app/views/uiemails/index.ctp on line 4
I have also put this in my layout's header:
<?php
//load the jQuery core
$javascript->link('jquery-1.4.2.min', false);
?>
I would appreciate any advice as to what I need to do to get this to work.. thanks
Edit
(I am using cakephp version 1.3.2 I have now tried:
putting this in my controller:
var $helpers = array('Form', 'Html');
then, in my view:
<?php
echo $this->html->script('index', false);
?>
but I still get:
Fatal error: Call to a member function script() on a non-object in /var/www/site1/app/views/uiemails/index.ctp on line 4