Use of is_empty with keywords attribute

Author Message

Patrice DUCLAUD

Friday 01 April 2005 5:49:32 am

i've created a classe with an attribute 'keywords'(mykeyword)
and i'd like to do something (show his content) only when he is not empty.
this code does not work ...
{section show=&node.object.data_map.mykeyword.is_empty|not()}
code to show the content of $node.object.data_map.keyword ...
{/section}
any idea ...
Thanks

bisk

Friday 01 April 2005 6:34:38 am

I think it's because you've written &node and .content is missing.

try

{section show=$node.object.data_map.mykeyword.content.is_empty|not}
your tpl code...
{/section}

or

{section show=$node.object.data_map.mykeyword.has_content}
your tpl code...
{/section}

-------------------------------
http://www.kookfijn.nl & http://www.magento.be

Patrice DUCLAUD

Sunday 03 April 2005 11:34:56 pm

>I think it's because you've written &node
ok ... it's a mistake when i've written my question ;-(

In this case, code does not work for me
$node.object.data_map.mykeyword.content.is_empty|not

but Thanks for this code,
$node.object.data_map.mykeyword.has_content
It's work fine for me...;-)

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

Main resources:

Total runtime0.6131 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.0060 589.2500152.6250
Module start 'layout' 0.00600.0024 741.875039.4453
Module start 'content' 0.00850.6031 781.3203498.5234
Module end 'content' 0.61150.0016 1,279.84388.1563
Script end 0.6131  1,288.0000 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.5316160.0002
Check MTime0.00130.2094160.0001
Mysql Total
Database connection0.00080.135510.0008
Mysqli_queries0.563591.9049570.0099
Looping result0.00060.0954550.0000
Template Total0.574993.820.2875
Template load0.00250.399720.0012
Template processing0.572493.364220.2862
Template load and register function0.00020.025510.0002
states
state_id_array0.00220.358010.0022
state_identifier_array0.00240.393220.0012
Override
Cache load0.00200.3194230.0001
Sytem overhead
Fetch class attribute can translate value0.00100.167520.0005
Fetch class attribute name0.00090.149730.0003
XML
Image XML parsing0.00020.039620.0001
class_abstraction
Instantiating content class attribute0.00000.001530.0000
General
dbfile0.00060.1006100.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/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
5content/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: 15
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs