I can do this in any of my View file in Cake PHP:
<?php echo $this->Html->script('myjs.js', false); ?> but if I do the same thing in my default view (default.ctp) then the JS files don't load i.e. they don't get echoed. I have tried moving includes above and below <?php echo $scripts_for_layout ?> in the default view but they still don't get printed:
<?php echo $scripts_for_layout ?> <?php echo $this->Html->script('myjs.js'); ?> <?php echo $this->Html->script('myjs.js'); ?> <?php echo $scripts_for_layout ?> Any ideas?
Thank you :).