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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 19:39:44
Script start
Timing: Jan 18 2025 19:39:44
Module start 'layout'
Timing: Jan 18 2025 19:39:44
Module start 'content'
Timing: Jan 18 2025 19:39:45
Module end 'content'
Timing: Jan 18 2025 19:39:45
Script end

Main resources:

Total runtime1.0260 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 587.9141152.6250
Module start 'layout' 0.00630.0032 740.539139.4453
Module start 'content' 0.00951.0152 779.9844439.8516
Module end 'content' 1.02470.0012 1,219.83598.1641
Script end 1.0259  1,228.0000 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3097160.0002
Check MTime0.00130.1244160.0001
Mysql Total
Database connection0.00090.091410.0009
Mysqli_queries0.987096.2014460.0215
Looping result0.00040.0434440.0000
Template Total0.996597.120.4982
Template load0.00190.184020.0009
Template processing0.994696.939820.4973
Template load and register function0.00010.009510.0001
states
state_id_array0.00080.074010.0008
state_identifier_array0.00080.082120.0004
Override
Cache load0.00150.1429190.0001
Sytem overhead
Fetch class attribute can translate value0.00050.046010.0005
Fetch class attribute name0.00060.053820.0003
XML
Image XML parsing0.00040.041710.0004
class_abstraction
Instantiating content class attribute0.00000.000420.0000
General
dbfile0.00080.0785160.0001
String conversion0.00000.001040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 8
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs