prepare template text hooks