Switch to ternary for template