Add leading zero to sorting numbers

I’m displaying the sorting number before each post title but I would like them to have a leading zero (e.g.: 01… 09… 10…).
I tried to do it with CSS counter instead but it wasn’t optimal.
Is there a way to tell Kirby to add it?


How about using str_pad() in your template?

That is a really great idea, and it’s working perfectly.
I didn’t think to try doing it with PHP.

Thanks for the super fast answer!