more elegant way of disabling templates on pages which don't use them