Matrix Display

Author Message

Pankaj Malhotra

Friday 14 October 2005 2:53:59 am

Hi,

In one of my pages I am showing the content of the matrix, how could i check is there any content in the matrix or not.

{attribute_view_gui attribute=$node.object.data_map.properties}

The above is the code through which i am displaying the contents i would like to know how many rows does it contain, if it contain more than one row then it should display the content other wise not. Please guide

Thanks in advance,
Pankaj

Ɓukasz Serwatka

Sunday 16 October 2005 11:49:04 pm

Hi,

Use this code to display how many rows or columns have your matrix

{*number of rows*}
{$node.object.data_map.properties.content.rowCount}

{*number of columns*}
{$node.object.data_map.properties.content.columnCount}

You can use {if} or sections, depends which version of eZ publish you use.

{if eq( $node.object.data_map.properties.content.rowCount, '100' )}
    {*show if number of rows is 100*}
{/if}

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Pankaj Malhotra

Tuesday 18 October 2005 3:43:45 am

Hi,

{*number of rows*}
{$node.object.data_map.properties.content.rowCount}

{*number of columns*}
{$node.object.data_map.properties.content.columnCount}

The above code gave me the static count which is being descibed in the admin panel. What I want to know, that how many rows contain the data, if its there then it shud display the content other wise not.

Please view the url given below

http://203.190.143.198/EZ/index.php//products/powdered_laundry_products/cleaners_no_3

In the above page there is a box termed as Physical Properties, for that I want to know if there is empty record in the matrix then it should not display that Properties Box.

Thanks in advance

Pankaj

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 01:24:37
Script start
Timing: Jan 19 2025 01:24:37
Module start 'layout'
Timing: Jan 19 2025 01:24:37
Module start 'content'
Timing: Jan 19 2025 01:24:38
Module end 'content'
Timing: Jan 19 2025 01:24:38
Script end

Main resources:

Total runtime0.8651 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0068 589.0313152.6094
Module start 'layout' 0.00680.0033 741.640639.4063
Module start 'content' 0.01020.8536 781.0469538.2734
Module end 'content' 0.86380.0013 1,319.320312.2031
Script end 0.8651  1,331.5234 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.4060160.0002
Check MTime0.00140.1565160.0001
Mysql Total
Database connection0.00080.098210.0008
Mysqli_queries0.810193.6475570.0142
Looping result0.00060.0696550.0000
Template Total0.831996.220.4160
Template load0.00220.254920.0011
Template processing0.829795.906120.4148
Template load and register function0.00010.016310.0001
states
state_id_array0.00070.076610.0007
state_identifier_array0.00120.137520.0006
Override
Cache load0.00180.2064260.0001
Sytem overhead
Fetch class attribute can translate value0.00090.103920.0004
Fetch class attribute name0.00140.159940.0003
XML
Image XML parsing0.00060.073220.0003
class_abstraction
Instantiating content class attribute0.00000.000940.0000
General
dbfile0.00110.1263180.0001
String conversion0.00000.001040.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.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: 16
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs