Conditionally check for existence of a select menu value

Author Message

Tony Stark

Monday 03 March 2008 9:32:34 am

Hi,

I need to check if a value within an attribute of a class has a value or not (single selection menu). I have tried the following, but it does not work:

{if eq(1,$node.object.data_map.myarttribute.attribute.content|count())}
has value...
{/if}

Any pointers to be able to conditionally check these values?

Thanks, Tony.

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

Main resources:

Total runtime1.4800 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.0077 589.4141152.6563
Module start 'layout' 0.00770.0036 742.070339.5078
Module start 'content' 0.01141.4673 781.5781399.8828
Module end 'content' 1.47860.0014 1,181.46098.0938
Script end 1.4800  1,189.5547 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.2341160.0002
Check MTime0.00150.0981160.0001
Mysql Total
Database connection0.00120.083210.0012
Mysqli_queries1.440197.2999460.0313
Looping result0.00050.0354440.0000
Template Total1.430096.620.7150
Template load0.00200.137920.0010
Template processing1.428096.480520.7140
Template load and register function0.00030.018710.0003
states
state_id_array0.00140.096010.0014
state_identifier_array0.00280.191720.0014
Override
Cache load0.00160.1081100.0002
Sytem overhead
Fetch class attribute can translate value0.00090.060810.0009
Fetch class attribute name0.00080.052910.0008
XML
Image XML parsing0.00010.007610.0001
class_abstraction
Instantiating content class attribute0.00000.000310.0000
General
dbfile0.00150.0997100.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
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/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: 6
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs