Add event to rendering context of all pages