generate pages controller