normalize view templates