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.