Correct this, you do in fact need the script in the page itself, rather than the layout