[show() 'error'] Check if $module_result.path[3][node_id] exists

[show() 'error'] Check if $module_result.path[3][node_id] exists

Friday 22 August 2003 6:22:57 am - 2 replies

Author Message

Mark Overduin

Monday 25 August 2003 12:31:27 am

Anyone?

Jan Borsodi

Tuesday 26 August 2003 6:50:07 am

Use the is_set operator to check for existance.
{section show=is_set($module_result.path[3][node_id])}
bla bla 1
{section-else]
bla bla 2
{/section}

or if you want to choose among many expression until you find one that exists you can use first_set, it will return the first parameter that exist.
{first_set($module_result.path[3][node_id],false())}
will return false (the second parameter) if no value exists.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

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.