This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » Setup & design » Fetch and nested attribute_filter

Fetch and nested attribute_filter

Fetch and nested attribute_filter

Tuesday 29 January 2008 4:50:51 pm - 2 replies

Hi all,

I'm in need for a possibility to use (or emulate) a nested attribute_filter using the fetch function.

Example with a simple boolean condition:

(a < 1) && ((b = 2) || (c = 3))

IMHO it's not possible to express this using an attribute-filter, as it only allows one boolean operator for all filter criterias.

I tried something like the following construct to nest the filter criterias, but it won't work either:

    array('myclass/attribute1, '<', '1'),
        array('myclass/attribute2', '=', '2'),
        array('myclass/attribute3', '=', '3)

Does anyone have another idea or is it simply not possible?

Kind regards,

Tuesday 29 January 2008 11:48:08 pm

Hi Tobias!

Have a look at the Extended attribute filter:

It might be what you are looking for.


Tuesday 15 December 2009 3:58:58 pm


I'm trying something similar at the moment and for some reason it's not working. I know I've made similar things in the past but the current version (4.2) doesn't seem to handle it.

Here's what my fetch looks like:

attribute_filter , array( 'and' , array( 'article/date_publication' , '>=' , 1261260000 ) ,
                                                                    array( 'article/titre' , 'like' , '*plat*' ) ,
                                                                    array( 'or' , array( 'article/chapo' , 'like' , '*commerciale*' ) ,
                                                                                  array( 'article/chapo' , 'like' , '*le*' )  ) )

Am I wrong ?


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

36 542 Users on board!

Forums menu

Proudly Developed with from