Use custom AffiniticBaseTemplate to allow hiding vars + some other stuff refs #5396
Allow to set a var to be required refs #5396