pages controller modified to use database page.