Testing an attribute value

Author Message

radoine d

Tuesday 14 June 2005 7:59:32 am

Hi

I have created a class containing an image. In the template attached to the content of this class, I need to test if the content of the attribute image is empty or not, i.e if there is an image to display. Is it possible? If possible how to do it?In more general, Is it possible to test if an attribute of a class is set or not?

Thanks for reading and helping me

François Xavier Lacroix

Tuesday 14 June 2005 8:47:46 am

hello,
I think you can try this :
http://www.ez.no/ez_publish/documentation/development/libraries/ez_template/functions/section/if_then_else_statements
http://www.ez.no/community/forum/setup_design/if_then_else_and_is_empty
To see 'how to' use the if-then-else and is_empty statement.

More precise, i think that this problem has been discussed in http://www.ez.no/community/forum/general/checking_if_an_attributes_value_ie_empty

good luck.

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

Main resources:

Total runtime0.9988 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 590.2734152.6250
Module start 'layout' 0.00670.0034 742.898439.4453
Module start 'content' 0.01010.9870 782.3438491.2500
Module end 'content' 0.99710.0016 1,273.59388.1641
Script end 0.9987  1,281.7578 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.3484160.0002
Check MTime0.00140.1371160.0001
Mysql Total
Database connection0.00070.074410.0007
Mysqli_queries0.951095.2200540.0176
Looping result0.00070.0743520.0000
Template Total0.946594.820.4732
Template load0.00210.207520.0010
Template processing0.944494.553820.4722
Template load and register function0.00030.027310.0003
states
state_id_array0.00230.226310.0023
state_identifier_array0.00180.179320.0009
Override
Cache load0.00170.1663150.0001
Sytem overhead
Fetch class attribute can translate value0.00060.060020.0003
Fetch class attribute name0.00150.145330.0005
XML
Image XML parsing0.00260.264220.0013
class_abstraction
Instantiating content class attribute0.00000.000930.0000
General
dbfile0.00330.3319160.0002
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
2content/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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.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: 8
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs