Generate pages controller