filtering a enum field

Author Message

johann savalle

Sunday 03 July 2005 9:26:00 pm

hi,
I am trying to filter an enum field but it doesn't seem to work...
I did the same before but with an integer field, and it was working fine...
here is the code :

{let children=fetch( content, list, hash( parent_node_id, $node.node_id,
                                          sort_by, $node.sort_array,
                                          class_filter_type, include,
                                          class_filter_array, array('71', '1'),
                                          attribute_filter, array(array('573', '=','1')),
                                          limit, $number_of_items,
                                          offset, $view_parameters.offset ) )}

<b>attribute_filter, array(array('573', '=','1'))</b> is the line which I am concerned about.. I don't get why it's not working..

any help ?

johann

Daniel Beyer

Monday 04 July 2005 8:14:09 am

Hi Johann,

this probably isn't helpful, but I suggest you do not use ezenum at all. It is officially deprecated since eZ publish 3.3. ezselection is replacing ezenum, so give that datatype a try.
The only fact ezenum is still in the core of eZ publish is because of backward compatibility.

Daniel Beyer
_________________________________
YMC AG
Kreuzlingen, Switzerland
web: www.ymc.ch
____________________________________

johann savalle

Monday 04 July 2005 9:17:19 am

mmm, I tried, and indeed... it doesn't do much ;)
but it 's still good to know...

so the topic is still open... if anyone had an idea how to do it, it would save time :) meanwhile, I'll try to crack it myself and update this issue if I find what's wrong...

johann savalle

Monday 04 July 2005 9:34:33 am

forget what I said above, it actually solved the problem
attribute_filter, array(array('575', '=',0)) is working.
I just got confused at the begining because I tried with the string description of the selection, but if we use id instead everything goes fine.

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