Show something if attribute is non-emtpy

Author Message

Felix Laate

Thursday 09 October 2003 1:12:31 am

Hi all!

I want some text to show only if the body attribute of the article is empty..

I've tried this:

{section show=ne($content_version.data_map.body.content,'')}
<div class="tekst">- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - </div>
{/section}

It gives me the text even if the body is empty ;-(

Felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

Paul Forsyth

Thursday 09 October 2003 1:28:52 am

Xml fields are usually never empty because of xml tags. But there is a specific test you can use for emptiness. See this thread:

http://ez.no/developer/ez_publish_3/forum/developer/how_to_test_an_xml_text_field_is_empty

paul

Felix Laate

Thursday 09 October 2003 1:43:48 am

Hi!

Thanx alot!

Felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

Thomas Schamm

Thursday 09 October 2003 4:22:04 am

This is good to no, as it is not documented in the docs or contributions.
Thanks for this link :-)
Greetz, Thomas

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.