generating a pages controller