I've used a URL template rather than a URL function in https://github.com/geoadmin/mf-geoadmin3/pull/261. We should be consistent. I have a preference for templates but I can probably be convinced otherwise.