Checking Length of variable

Checking Length of variable

Monday 21 April 2008 9:58:54 am - 2 replies

Modified on Monday 21 April 2008 10:04:56 am by Tony Stark

Author Message

Felix Laate

Monday 21 April 2008 11:40:01 am

Hi Tony,

you could use the count_chars-operator:

http://ez.no/doc/ez_publish/technical_manual/4_0/reference/template_operators/strings/count_chars

{if gt($mytext|count_chars,'0')}
your code..
{/if}

Felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

Maxime Thomas

Monday 21 April 2008 11:39:15 pm

Or in a prefixed way :

{if $mytext|count()|gt(0)}
...
{/if}

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

You must be logged in to post messages in this topic!

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