add templating support for pages