Reading a matrix attribute

Author Message

Sébastien Antoniotti

Tuesday 25 September 2007 9:47:04 am

Hi,

I'm using a matrix attribute who is configured like this :

column1 : key
column2 : lang
column3 : value

So I have this structure :

<b>key | value | desc</b>
-------------------------------
key1 | fr | value1
key1 | en | value2
key1 | it | value3

And I'm looking for a way to directely access lines of my matrix by exemple by using

{set $theValue = $myMatrix['key1']['fr']}

Is it possible ?

Thanks for your help !

eZ Publish Freelance
web : http://www.webaxis.fr

Sébastien Antoniotti

Wednesday 26 September 2007 2:43:02 am

The solution I found was to develop my own template operator.

eZ Publish Freelance
web : http://www.webaxis.fr

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 19 2025 03:30:19
Script start
Timing: Jan 19 2025 03:30:19
Module start 'layout'
Timing: Jan 19 2025 03:30:19
Module start 'content'
Timing: Jan 19 2025 03:30:20
Module end 'content'
Timing: Jan 19 2025 03:30:20
Script end

Main resources:

Total runtime1.1420 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 589.1484152.6250
Module start 'layout' 0.00570.0030 741.773439.4453
Module start 'content' 0.00871.1317 781.2188491.2266
Module end 'content' 1.14040.0015 1,272.44538.1641
Script end 1.1420  1,280.6094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.2766160.0002
Check MTime0.00140.1188160.0001
Mysql Total
Database connection0.00080.069310.0008
Mysqli_queries1.092495.6605520.0210
Looping result0.00040.0367500.0000
Template Total1.110897.320.5554
Template load0.00240.207120.0012
Template processing1.108497.056620.5542
Template load and register function0.00010.010310.0001
states
state_id_array0.00050.043410.0005
state_identifier_array0.00230.205720.0012
Override
Cache load0.00200.1733220.0001
Sytem overhead
Fetch class attribute can translate value0.00080.068210.0008
Fetch class attribute name0.00120.105630.0004
XML
Image XML parsing0.00060.052510.0006
class_abstraction
Instantiating content class attribute0.00000.001040.0000
General
dbfile0.00120.1023160.0001
String conversion0.00000.000540.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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs