begining of the template plugin