Can't find value of an ezselection datatype

Author Message

Thomas Brandl

Wednesday 24 September 2003 2:14:47 am

Hi,

I trying to display a list of objects containing a selection datatype value. I cannot find this value anywhere under data_map!!

{$node.0.data_map.myoptionlist.content} i.e seems to contain the index within the option list, I can't find it's 'real' value though!

Any clues?
thanks!
t

Thomas Brandl

Thursday 25 September 2003 2:49:34 am

Sorry to bother, but I need this!
Nobody ever displayed a selection value?? Noone?

Paul Forsyth

Thursday 25 September 2003 2:51:54 am

Have you tried the usual:

{$node.0.data_map.myoptionlist|attribute(show)}

paul

Thomas Brandl

Thursday 25 September 2003 4:34:29 am

Well, that's another problem I have.
{$:item|attribute(show)} works but when I try to list any other objects/arrays below that, I get a blank site or a timeout:
{$:item.data_map|attribute(show)} -> blank site
{$:item.object|attribute(show)} -> timeout

BUT: I found it. Using {attribute_view_gui} made it! I was trying to access it with {$node.data_map.myoptionlist.xy}, which works for most datatypes, but not for selection!

Thanks Paul!
t

Paul Forsyth

Thursday 25 September 2003 4:41:53 am

I often find i resort to looking at the ez templates to see how they do it :)

Look at this:

design/standard/templates/content/datatype/view/ezselection.tpl

This is the code used when {attribute_view_gui} is called.

Paul

Thomas Brandl

Thursday 25 September 2003 8:53:29 am

Yep, that I did, thinking "how the hell are they doing it" before I stopped realizing "shouldn't attribute_view_gui display just that ver template!? Yes, it should!

Too much computer work makes one so narrow-minded...

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 19:27:54
Script start
Timing: Jan 18 2025 19:27:54
Module start 'layout'
Timing: Jan 18 2025 19:27:54
Module start 'content'
Timing: Jan 18 2025 19:27:54
Module end 'content'
Timing: Jan 18 2025 19:27:54
Script end

Main resources:

Total runtime0.5856 sec
Peak memory usage4,096.0000 KB
Database Queries66

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0037 588.0391152.6406
Module start 'layout' 0.00370.0032 740.679739.4766
Module start 'content' 0.00690.5775 780.1563501.4063
Module end 'content' 0.58440.0012 1,281.562512.1250
Script end 0.5855  1,293.6875 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00280.4824160.0002
Check MTime0.00120.2058160.0001
Mysql Total
Database connection0.00040.069810.0004
Mysqli_queries0.538391.9265660.0082
Looping result0.00060.0959640.0000
Template Total0.558495.420.2792
Template load0.00180.311820.0009
Template processing0.556695.048020.2783
Template load and register function0.00020.025810.0002
states
state_id_array0.00070.124510.0007
state_identifier_array0.00070.120620.0004
Override
Cache load0.00150.2581330.0000
Sytem overhead
Fetch class attribute can translate value0.00060.094420.0003
Fetch class attribute name0.00100.174960.0002
XML
Image XML parsing0.00030.044620.0001
class_abstraction
Instantiating content class attribute0.00000.002260.0000
General
dbfile0.00060.0960100.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
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 20
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs