Sets the view and controller for each page