Add conditional on classes in template