to include on a per controller basis, you could use the headScript placeholder that the framework provides in your controllers init() method. There are certainly more complex ways but that seems sufficient if the only stipulation is per controller.
// in Action Controller
public function init(){
// to include a file
$this->view->headScript()->appendFile($filename);
// or to include arbitrary code
$this->view->headScript()->appendScript($scriptStr);
}
The section in the online docs is:
61.4.1.9. HeadScript Helper
cheers.


LinkBack URL
About LinkBacks



Reply With Quote
I added the two lines to the init of my controller but I couldn't find the JS scripts when the layout was rendered. Any ideas?
