Move var from route to PagesController.