Added method renderTemplate