Set up pageinit function for all of my pages.