Modified the site controller to build pages from the database