Forums / Suggestions / Suggest new datatype: List

Suggest new datatype: List

Author Message

Esben Maaløe

Thursday 19 June 2003 11:54:11 am

It would be awesome if you could define lists that you could assign as properties to classes. The objects of that class' corresponding property would then have the value of one of the list items

Esben Maaløe

Thursday 19 June 2003 12:50:26 pm

I think it is a splendid idea

NOTE: The fact that the topic poster and I share the same name and login is purely coincidential ;)

Bård Farstad

Thursday 19 June 2003 12:53:47 pm

We've added a new datatype, object relation list, which is used to have a list of object inside another object. Typical luse cases: person with list of address objects, car with list of images, person with list of documents. The list is compiled of normal eZ publish objects. The objects can be stored in the content tree or not.

Not sure if this is what you need, but you can test it out in the trunk svn.

--bård

Documentation: http://ez.no/doc

Esben Maaløe

Thursday 19 June 2003 6:11:24 pm

Say I want to do a site about WWII aircraft (not that far fetched - I am a flightsim nerd - Il2 Forgotten Battles rule !)

The relevant Aircrafts are either manufactured in Russia, Germany, U.S.A. or England.

Say I have some friends (not that far fetched either - I DO actually have a couple of friends :) ) who are not computer buffs - I'd like them to be able to add/edit ACs - but I don't want half of them writing 'U.S.S.R' - the other half 'C.C.C.P' and the last half 'Russia' (one of them can't spell - so he writes ' Rusia' - and as you can see I can't add). I'd like to be able to assign a list of valid values for the 'Manufactured in' field - sort of like the enum field in MySQL. The 'attribute_edit_gui' would then present a select box with the valid values.

I don't know if your object_relation_list would be useable in such a case - but I suspect that it would most likely be a workaround.

Esben Maaløe

Thursday 19 June 2003 6:32:33 pm

Browsed the documentation - wanted to see how you can write new datatypes.

There is a datatype called 'enum' !!

That's it - I am a happy man :D

Gabriel Ambuehl

Friday 20 June 2003 3:12:52 am

Where's the difference between object relation list and just plain simple having the attributes existing as subnodes?

Visit http://triligon.org

Paul K Egell-Johnsen

Friday 20 June 2003 4:49:11 am

If only everyones happiness could be gotten as easily.

--
http://www.vogol.com/user/spdyvkng/blog/

Paul Forsyth

Friday 20 June 2003 5:11:54 am

maybe we need a happiness datatype :)

Paul Borgermans

Friday 20 June 2003 6:28:43 am

You may want to use the new matrix datatype: you can correlate hapiness with other parameters like features implemented in ez publish ;-)

Watch

http://zev.ez.no/svn/nextgen/trunk/kernel/classes/datatypes/

The new ones up to now:

keyword (3.1)
matrix (3.2)
objectrelationlist (3.2)
subtreesubscription (3.1)

--paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Paul Forsyth

Friday 20 June 2003 7:14:59 am

friday = happiness.

ive been using keyword for a while now but its still a little buggy for multiple keywords though, yet to be fixed.

paul

cfa cfa

Saturday 16 August 2003 7:30:34 am

Paul, is the link you published broken? Doesn't seem to work.
http://zev.ez.no/svn/nextgen/trunk/kernel/classes/datatypes/

Hans Melis

Sunday 17 August 2003 11:08:12 pm

The EZP team took the svn server down temporarily. For more info: http://ez.no/developer/ez_publish_3/forum/developer/taking_down_svn

Hans
http://blog.hansmelis.be

eZ debug

Timing: Jan 30 2025 01:04:43
Script start
Timing: Jan 30 2025 01:04:43
Module start 'content'
Timing: Jan 30 2025 01:04:43
Module end 'content'
Timing: Jan 30 2025 01:04:43
Script end

Main resources:

Total runtime0.1798 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.0075 587.9297180.8359
Module start 'content' 0.00750.0069 768.7656105.8672
Module end 'content' 0.01440.1653 874.6328535.5781
Script end 0.1797  1,410.2109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00362.0066200.0002
Check MTime0.00130.7244200.0001
Mysql Total
Database connection0.00090.523410.0009
Mysqli_queries0.098954.99321410.0007
Looping result0.00120.64491390.0000
Template Total0.164991.710.1649
Template load0.00070.402710.0007
Template processing0.164291.330110.1642
Override
Cache load0.00050.285210.0005
Sytem overhead
Fetch class attribute can translate value0.00150.841510.0015
XML
Image XML parsing0.00020.115810.0002
General
dbfile0.036220.1490200.0018
String conversion0.00000.002830.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.0002 secs