fix parse tmpl from layout