replace the php tags with erb tags

this is by no means the complete changes required for templates