I have a number field used for episode numbers and I would like to automatically add a leading zero when the number is less than 10. I have this working with a conditional but it seems inefficient. Is there a twig filter that I don't know about that does this?
{% if entry.episodeNumber < "10" %}
{% set episodeNumber = '0' ~ entry.episodeNumber %}
{% else %}
{% set episodeNumber = entry.episodeNumber %}
{% endif %}
The above works but seems overly long to accomplish what should be a simple task.