Much better conditional in template