In CakePHP 2.1:
What’s the best way to add a snippet of Javascript once only to my layout (ie. a block) now that
View->addScript() is deprecated?
EDIT:
$this->Html->script() (linking to a JS file) seems to keep track of duplicate scripts,
but $this->Html->scriptBlock() (inline JS) does not. 🙁
And make sure your script is in the js folder in the webroot