update delete function for page and menu