How can I use conditional control(if) with datatypes(enum)?

Author Message

Daniel Lopes

Monday 15 June 2009 11:43:37 am

Hi there,

I created a new class in my site and I would like to print a css class on my template.

{if eq($node.object.data_map.my_attribute.output,'css_class')}
<print this>
{else}
<or print this>
{/if}

Thanks

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

Main resources:

Total runtime0.8832 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0070 588.1719152.6563
Module start 'layout' 0.00700.0031 740.828139.5078
Module start 'content' 0.01010.8717 780.3359433.7500
Module end 'content' 0.88180.0014 1,214.08598.0938
Script end 0.8832  1,222.1797 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00420.4774160.0003
Check MTime0.00160.1795160.0001
Mysql Total
Database connection0.00070.078610.0007
Mysqli_queries0.838794.9631460.0182
Looping result0.00050.0556440.0000
Template Total0.843795.520.4218
Template load0.00240.269620.0012
Template processing0.841395.254820.4206
Template load and register function0.00010.012510.0001
states
state_id_array0.00090.096410.0009
state_identifier_array0.00100.110920.0005
Override
Cache load0.00190.220780.0002
Sytem overhead
Fetch class attribute can translate value0.00080.088810.0008
Fetch class attribute name0.00060.069820.0003
XML
Image XML parsing0.00050.061510.0005
class_abstraction
Instantiating content class attribute0.00000.000520.0000
General
dbfile0.00090.1037160.0001
String conversion0.00000.001140.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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/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/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: 7
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs