A web developer's blog. PHP, MySQL, CakePHP, Zend Framework, Wordpress, Code Igniter, Django, Python, CSS, Javascript, jQuery, Knockout.js, and other web development topics.

Tag Archives: headstyle

Zend Framework: Adding Javascript files depending on Controller

I had similar instances on where I had to do this on my application. To add a Javascript depending on what Controller is loaded, you do this: <?php   class ReportController extends Zend_Controller_Action { public function init() { $this->view->headScript()->appendFile(’path/to/the/javascript/file’); } … Continue reading

Posted in General | Tagged , , , , | 8 Comments