Forums / Developer / Ordering output of ezselection

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Ordering output of ezselection

Author Message

Eric Weik

Friday 28 January 2005 6:31:30 pm

I've worked on a number of projects where we ended up using a custom selection datatype instead of ezselection simply because the items in the selection may change over time. I.e. lets say that a class has an attribute with the following initial options:
Red
Yellow
Blue
Violet

But later this needs to be updated with orange and green. Right now our only option is to do "new options" twice, resulting in a rainbow that is out of order:
Red
Yellow
Blue
Violet
Orange
Green

My solution has always been to create a new datatype for these that actually stores its values as text. This way the creation of the dropdown comes from a template (and can easily be re-ordered). However, creating a new datatype is somewhat arduous (and does not encourage re-use).

Anyone have any suggestions on how to work around this, or should I just add a suggestion to the bug tracker?

-Eric