fetching attribute options

Author Message

Erlend Halvorsen

Sunday 02 July 2006 8:06:58 am

Is there an easy way to retrieve the options for an attribute? I have a guestbook, where you, for one of the fields, have to make a selection from a dropdown. I want to display a page with a graph over these options, like a poll result. For now, I have the graph and the guestbook form on the same page, so I just loop through the $object.data_map.*someattribute*.class_content.options array , but it would be nice not to have this dependency, if I want to move the result display later on.

-Erlend

Kristof Coomans

Tuesday 04 July 2006 3:59:46 am

You can fetch the options from the class attribute instead of the object attribute. Take a look at this reply: http://ez.no/community/forum/setup_design/filter_content_passing_values_from_url#msg81957.

I hope I understood your question right.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.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 11:26:23
Script start
Timing: Jan 18 2025 11:26:23
Module start 'layout'
Timing: Jan 18 2025 11:26:23
Module start 'content'
Timing: Jan 18 2025 11:26:23
Module end 'content'
Timing: Jan 18 2025 11:26:23
Script end

Main resources:

Total runtime0.7927 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0064 589.0469152.6250
Module start 'layout' 0.00650.0032 741.671939.4453
Module start 'content' 0.00960.7817 781.1172520.0703
Module end 'content' 0.79130.0014 1,301.18758.1641
Script end 0.7927  1,309.3516 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.4384160.0002
Check MTime0.00150.1834160.0001
Mysql Total
Database connection0.00080.096010.0008
Mysqli_queries0.746194.1232540.0138
Looping result0.00060.0778520.0000
Template Total0.755395.320.3776
Template load0.00250.320420.0013
Template processing0.752794.952720.3764
Template load and register function0.00020.019910.0002
states
state_id_array0.00120.153510.0012
state_identifier_array0.00100.130020.0005
Override
Cache load0.00210.264490.0002
Sytem overhead
Fetch class attribute can translate value0.00070.092620.0004
Fetch class attribute name0.00160.196630.0005
XML
Image XML parsing0.00050.060420.0002
class_abstraction
Instantiating content class attribute0.00000.001830.0000
General
dbfile0.00090.1145160.0001
String conversion0.00000.001540.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.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: 7
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs