use conditional in template