getkirby / ideas

This is the backlog of ideas and feature requests from the last two years. Use our new feedback platform to post your new ideas or vote on existing ideas.
https://feedback.getkirby.com
20 stars 0 forks source link

Blueprint: disable file `sort` for non-default languages #454

Open texnixe opened 4 years ago

texnixe commented 4 years ago

Currently, it is not easily possible to disable files section sorting in non-default languages. I can use a workaround by defining a sort field in a files blueprint like this:

  sort:
    type: hidden
    translate: false

However, this doesn't disable the sort handles and the default sort order is only restored after reloading the page in the Panel.

It would be great if the sortable property could be set conditionally:

files:
    sortable: "{{ kirby.language.isDefault }}"

This should disable the sort handles in the non-default languages.

distantnative commented 4 years ago

Are there actual use cases where we would have different sort orders between different translations? Wondering if it should not be the default to only have it sortable in the default translation.

texnixe commented 4 years ago

I don't know, maybe that should indeed be the default, however, I don't think we should completely prevent it. Because Kirby doesn't make too many assumptions..., does it?

distantnative commented 4 years ago

My current approach would be to support queries for the sortable option and make kirby.language.isDefault the default value for it.