change toggleTemplate to template