Marko Žmak
|
Friday 01 April 2005 5:34:46 pm
Is there a possibility to combine 'and' and 'or' operators in attribute filtering? So that I can use logical expressions like this: condition1 and (condition2 or condition3) I know that I can obtain this by fetching the data and filtering later, but I would like if there's a way to do this with fetch() operator.
--
Nothing is impossible. Not if you can imagine it!
Hubert Farnsworth
|
Łukasz Serwatka
|
Sunday 03 April 2005 10:28:54 pm
Hi Marko, Yes, this is possibile. More information you can find in documentation
http://ez.no/ez_publish/documentation/reference/template_operators/logic/and
http://ez.no/ez_publish/documentation/reference/template_operators/logic/or http://ez.no/ez_publish/documentation/reference/data_fetching/content/list
Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog
|
Marko Žmak
|
Monday 04 April 2005 1:35:43 pm
In the docs there are only examples how to use only one logical operator, examples like this:
array( 'and', array( 'priority', '20' ), array( 'article/title', '=', 'abc' ) )
What I want to use with attribute filtering is something like this:
array('and',
array('article/title','=','abc'),
array('or', array('priority','=','5'),
array('priority','=','11'),
)
)
Since this case is not documented in the examples, and when I tried to use it it didn't work, I'd like to know if this is possible in eZ and has someone tried it? And succeseded of course :)
--
Nothing is impossible. Not if you can imagine it!
Hubert Farnsworth
|