Choosing elements of a specific hierarchy?

Author Message

Gabriel Ambuehl

Sunday 13 April 2003 4:20:50 am

I'd like to do something like the following:

Option_container
option_instance_1
option_instance_2
option_instance_3

(Basically a custom new class that holds options whereas all options are contained in option_container).

Now I'd like to have a type that is like enum but always lets the user chose the elements stored belov option_container.

Enum doesn't cut it as I need to have the same options for different classes which would need to have the options reentered all the time (additionally, I need to store some more data per option than just a name).

Visit http://triligon.org

Peter Bailey

Monday 14 April 2003 7:01:44 am

If you're up for it, I'm quite certain you can create your own datatypes.

Go to /kerner/classes/datatypes/ and you'll see folders for all the datatypes, including enum.

See the following tutorial about making your own
http://ez.no/sdk/tutorials/view/datatypes

Jan Borsodi

Monday 14 April 2003 7:18:02 am

You can do this with a custom module and a new datatype.
The module would handle the creation of the option lists and the datatype would refer to one your option items making it easy to use in multiple classes.

I would recommend looking at either the option or enum datatype for example code.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Gabriel Ambuehl

Monday 14 April 2003 7:52:27 am

I was kinda hoping I could do without implementing a new datatype but hey, I gotta try it at one time (just not today ;-).

I don't think I need a module for it though as I simply want it to display all the 1st level children of a given node.

I've eben been thinking of just abusing the multi category feature for linkage (to link employes to projects for one).

Visit http://triligon.org

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 05:13:55
Script start
Timing: Jan 18 2025 05:13:55
Module start 'layout'
Timing: Jan 18 2025 05:13:55
Module start 'content'
Timing: Jan 18 2025 05:13:55
Module end 'content'
Timing: Jan 18 2025 05:13:55
Script end

Main resources:

Total runtime0.7721 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 588.0469152.6406
Module start 'layout' 0.00620.0030 740.687539.4766
Module start 'content' 0.00920.7618 780.1641578.6328
Module end 'content' 0.77100.0011 1,358.796912.1250
Script end 0.7721  1,370.9219 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.4253160.0002
Check MTime0.00130.1726160.0001
Mysql Total
Database connection0.00080.100810.0008
Mysqli_queries0.722693.5804620.0117
Looping result0.00050.0651600.0000
Template Total0.742996.220.3715
Template load0.00190.251620.0010
Template processing0.741095.964820.3705
Template load and register function0.00020.030110.0002
states
state_id_array0.00070.096610.0007
state_identifier_array0.00060.077720.0003
Override
Cache load0.00160.2063250.0001
Sytem overhead
Fetch class attribute can translate value0.00050.069430.0002
Fetch class attribute name0.00200.259250.0004
XML
Image XML parsing0.00080.105430.0003
class_abstraction
Instantiating content class attribute0.00000.001550.0000
General
dbfile0.00100.1276170.0001
String conversion0.00000.001140.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
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs