I’ve made a few websites using Kirby so far, which was generally a pleasant experience However, there is one issue which keeps coming back, that I find a bit confusing:
It seems that it’s not possible to specify a default sorting for a page blueprint (if I want to sort by some non-numeric field).
For example, say that I have a page blueprint Person
, and in general, I want to sort those by lastName
. If I understand correctly, I need to call sortBy('lastName')
on the collection of pages everywhere I use them (like in the templates, but also in the pages sections for the panel).
However, wouldn’t it make sense to specify a default sorting for page blueprints? In my opinion, a blueprint will often have one default way of sorting (like on first/last name for people). It feels a bit annoying that I need to specify this manually in several places, instead of configuring it at one place?
Of course there could always be exceptions, so keeping the sortBy()
method for those situations is great. I just don’t get why I cannot specify one default sorting.