Add conditionals to template tags