add before filter to get pages for creating a dynamic menu. add dynamic menu code to app