Added PHP code support in templates