Very strange on if query

Very strange on if query

Tuesday 29 August 2006 4:14:43 am - 1 reply

Author Message

Christian Johansen

Tuesday 29 August 2006 5:59:54 am

You need the is_set function. Change this:

{if eq($p,'')}
{set $p = 1}
Testing
{/if}

To this:

{if not( is_set( $p ) )}{def $p=1}{/if}

If it is likely that $p exists but is empty to this:

{if not( is_set( $p ) )}{def $p=1}{/if}
{if $p|eq( '' )}{set $p=1}{/if}

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.