This code should be put in your layout template, for example if you use a Two Columns Layout, put it in the 'layout_two_columns.html' file.