Adjust render template function.