templating using if and if-not