luyadev / luya-module-cms

The LUYA CMS module provides a full functional CMS for adding contents based on blocks.
https://luya.io
MIT License
33 stars 46 forks source link

Unexpected container order #374

Open hbugdoll opened 2 years ago

hbugdoll commented 2 years ago

What steps will reproduce the problem?

Add multiple containers in the CMS.

What is the expected result?

Containers are sorted like in CMS Settings > Containers and thus by ID.

What do you get instead?

Containers are sorted by name in alphabetical order.

Additional infos

Q A
LUYA Version current

@nadar If you agree I can provide a PR.

nadar commented 2 years ago

In an upcoming release we could add a migration with a sorting field. Maybe we could also use the alias to sort as they are not visible in the UI. So things like 0default 1abc would be possible? What do you think?

nadar commented 2 years ago

@rolandschaub recommendations?

hbugdoll commented 2 years ago

In an upcoming release we could add a migration with a sorting field. Maybe we could also use the alias to sort as they are not visible in the UI. So things like 0default 1abc would be possible? What do you think?

Using the alias may be a workaround (but we heavily use "fixed" container aliases). A new sorting ID would be the preferred way and consistent to menu item's sort_index.

nadar commented 2 years ago

A new migration would require us to release a new major version (5.0). So i will assign this milestone :+1: