Change hook to before_render

Not seeing the old hook in the docs, before_render makes sure it's right before the page is shown