Set Variables for a template