Testing an attribute content

Author Message

Virgilio Lemos

Friday 23 October 2009 11:22:23 am

I need to display a content of "plano" attribute but only if it has a determined value.

attribute_view_gui attribute=$node.object.data_map.plano 

</code>How can I test the content of the attribute before display it?

Paul Borgermans

Friday 23 October 2009 1:41:37 pm

While I don't know the dataype for this attribute, inspect

{$node.object.data_map.plano.content|attribute(show)}

In your template and possibly use one of the elements there

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Piotrek Karaƛ

Saturday 24 October 2009 7:49:18 am

Isn't it about:

{if $node.object.data_map.plano.has_content}
...
{/if}

?

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

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:16:44
Script start
Timing: Jan 18 2025 11:16:44
Module start 'layout'
Timing: Jan 18 2025 11:16:44
Module start 'content'
Timing: Jan 18 2025 11:16:44
Module end 'content'
Timing: Jan 18 2025 11:16:44
Script end

Main resources:

Total runtime0.8432 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0078 587.9141152.6250
Module start 'layout' 0.00780.0034 740.539139.4453
Module start 'content' 0.01120.8307 779.9844583.6641
Module end 'content' 0.84190.0013 1,363.648412.4766
Script end 0.8432  1,376.1250 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3942160.0002
Check MTime0.00140.1702160.0001
Mysql Total
Database connection0.00090.105810.0009
Mysqli_queries0.786493.2631590.0133
Looping result0.00060.0728570.0000
Template Total0.803995.320.4020
Template load0.00350.415420.0018
Template processing0.800494.926720.4002
Template load and register function0.00010.012010.0001
states
state_id_array0.00080.097710.0008
state_identifier_array0.00180.216020.0009
Override
Cache load0.00300.3521170.0002
Sytem overhead
Fetch class attribute can translate value0.00050.060630.0002
Fetch class attribute name0.00100.117760.0002
XML
Image XML parsing0.00260.313730.0009
class_abstraction
Instantiating content class attribute0.00000.001360.0000
General
dbfile0.00400.4721300.0001
String conversion0.00000.001240.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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.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/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: 17
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs