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.

eZ debug

Timing: Jan 20 2025 07:51:13
Script start
Timing: Jan 20 2025 07:51:13
Module start 'layout'
Timing: Jan 20 2025 07:51:13
Module start 'content'
Timing: Jan 20 2025 07:51:13
Module end 'content'
Timing: Jan 20 2025 07:51:13
Script end

Main resources:

Total runtime0.0183 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0080 590.2813152.6250
Module start 'layout' 0.00800.0037 742.906339.4297
Module start 'content' 0.01180.0044 782.335989.4141
Module end 'content' 0.01620.0021 871.750034.3047
Script end 0.0183  906.0547 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002614.2383140.0002
Check MTime0.00126.7427140.0001
Mysql Total
Database connection0.00105.274510.0010
Mysqli_queries0.004725.749730.0016
Looping result0.00000.206810.0000
Template Total0.00179.510.0017
Template load0.00095.028710.0009
Template processing0.00084.390210.0008
Override
Cache load0.00063.529410.0006
General
dbfile0.00031.525480.0000
String conversion0.00000.070240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs