transform php pages in templates