apply template on embed script