Attribute filter in fetch

Author Message

SathishKumar Subramanian

Thursday 11 March 2004 9:20:16 pm

hi,
I have a simple question: does fetch support filtering by the checkbox attribute? I have the following code which doesn't work:

section loop=fetch( content, list, hash( parent_node_id, $language_id, attribute_filter, array( array(339, '=', '1') ), sort_by, array( "priority", true () ) ) )

where the Check box attribute id is 339.

How can I fetch the contents which are only selected by using the checkbox?

if its not supported, is there any other way to do it?

thanks in advance
Sathizh

Iain MacLean

Friday 12 March 2004 12:46:57 am

Hi Sathish

Try adding the 'or' operator to the attribute filter like this:

attribute_filter, array('or', array(339, '=', '1'))

I've just used something like this to filter a fetch result on a checkbox (actually, two checkboxes) in a class and it seems to be working properly.

Cheers

Iain

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