Forums / Developer / Choosing elements of a specific hierarchy?

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

eZ debug

Timing: Jan 18 2025 02:06:07
Script start
Timing: Jan 18 2025 02:06:07
Module start 'content'
Timing: Jan 18 2025 02:06:07
Module end 'content'
Timing: Jan 18 2025 02:06:07
Script end

Main resources:

Total runtime0.1732 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 589.3672180.8125
Module start 'content' 0.00650.0048 770.179793.9297
Module end 'content' 0.01130.1618 864.1094522.6250
Script end 0.1731  1,386.7344 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00331.9272200.0002
Check MTime0.00130.7627200.0001
Mysql Total
Database connection0.00110.644910.0011
Mysqli_queries0.123271.10351410.0009
Looping result0.00150.88421390.0000
Template Total0.161493.210.1614
Template load0.00080.486710.0008
Template processing0.160692.714110.1606
Override
Cache load0.00060.325010.0006
Sytem overhead
Fetch class attribute can translate value0.00090.520710.0009
XML
Image XML parsing0.00030.153510.0003
General
dbfile0.00623.5999200.0003
String conversion0.00000.003630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs