Forums / Developer / content class as attribute

content class as attribute

Author Message

Sebastiaan van der Vliet

Tuesday 01 July 2003 6:08:58 am

Hi,
I want add a select/dropdown list as an attribute to a content class that contains the objects of another content class. Basically I have a content class called "country", with the various countries as content objects, eg Netherlands, France, etc. When I publish an article I want to be able to select the country from the select/dropdown, instead of using the default browse page to find the related country content object. I don't want to use the enum datatype because I want to use all the functionality available to content classes. I have checked out the ezobjectrelationlist datatype, but it only allows adding new content items, not selecting existing ones. Can anybody explain me how this should be done?

Certified eZ publish developer with over 9 years of eZ publish experience. Available for challenging eZ publish projects as a technical consultant, project manager, trouble shooter or strategic advisor.

Esben Maaløe

Tuesday 01 July 2003 8:22:56 am

You might wanna check out the contribution page

I added a new datatype called eZCountry - it will do what you are asking for. But u'd have to give up the idea of countries as content-classes, which should be no problem if I understand your intentions correctly

Sebastiaan van der Vliet

Tuesday 01 July 2003 12:12:09 pm

Hi, unfortunately I'm not willing to let go of the idea of using a content class as an object, because it would restrict the possibilities to label information. Besides a country content class I'm also thinking about a thesaurus content class. The keywords in the thesaurus are often related, and could be grouped under broader categories, and even in different languages. The same story goes for other labels I plan to use for content, such as project, theme and organisation.

If I could use the content class as a label, i would be able to specify relationships between items in the 'labelling content class'. Even in the case of the country datatype it would be interesting to be able to express relations between countries, for example in the form of regions. It would also allow me to specify additional information, translations, etc. This is not possible by hardcoding the objects into a file.

In case of the country datatype, maybe the template file containing the countries could be generated automatically from a country content class?

Certified eZ publish developer with over 9 years of eZ publish experience. Available for challenging eZ publish projects as a technical consultant, project manager, trouble shooter or strategic advisor.

Bruce Morrison

Tuesday 01 July 2003 5:44:03 pm

Sounds like my request:
http://ez.no/developer/ez_publish_3/forum/developer/related_objects_choosing_from_a_dropdown_instead_of_using_browse

I'm also interested in any solutions for this.

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

eZ debug

Timing: Jan 30 2025 21:37:29
Script start
Timing: Jan 30 2025 21:37:29
Module start 'content'
Timing: Jan 30 2025 21:37:29
Module end 'content'
Timing: Jan 30 2025 21:37:29
Script end

Main resources:

Total runtime0.3270 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0097 587.9297370.2969
Module start 'content' 0.00970.0152 958.22661,005.5156
Module end 'content' 0.02500.3020 1,963.74223,894.1875
Script end 0.3270  5,857.9297 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00471.4397200.0002
Check MTime0.00150.4504200.0001
Mysql Total
Database connection0.00070.225110.0007
Mysqli_queries0.229270.07081410.0016
Looping result0.00150.47031390.0000
Template Total0.301592.210.3015
Template load0.00090.271510.0009
Template processing0.300791.934310.3007
Override
Cache load0.00060.186610.0006
Sytem overhead
Fetch class attribute can translate value0.00190.585610.0019
XML
Image XML parsing0.00030.076510.0003
General
dbfile0.00662.0311200.0003
String conversion0.00000.002530.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