Remove the toTemplateObject method from pages.