add text hooks to templates