Wednesday, March 31, 2010

Undefined variable: javascript

Notice (8): Undefined variable: javascript [APP/views/layouts/
default.ctp, line 6]
Fatal error: Call to a member function link() on a non-object in /var/
www/cake/app/views/layouts/default.ctp on line 6

Controller Code is
var $components = array('Auth');
var $helpers = array('Javascript','Form','Html','Event');

default.ctp
<?php echo $html->css('datepicker')."\n"; ?>
<?php echo $javascript->link('datepicker.js')."\n"; ?>

$helpers array is defined only in AppController

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.

No comments: