unify posts and pages controller.