applied template to all pages