Sorted ordering of templates.