Selection attribute_filter with content search

Author Message

Jeremy B.

Tuesday 25 August 2009 7:31:53 am

Hi there,

I'm trying to do an attribute_filter on a 'selection' attribute type when fetching with 'content' 'search'. But the system is always returning all items, without filtering their values.

I saw in the doc that it's doable, and also there :
http://ez.no/developer/forum/general/attribute_filter_on_fetch_content_list

But I can't make it work :(

I tried :

'attribute_filter', 	array(array('myclass/selection_attribute', '=', array(1)))
'attribute_filter', 	array(array('myclass/selection_attribute', 'in', array(1)))
'attribute_filter', 	array(array('myclass/selection_attribute', '=', 1))
'attribute_filter', 	array(array('attributeId', 'in', 1))
'attribute_filter', 	array(array('attributeId', '=', array(1)))
[...]

where '1' is the option index selected in the object of type "myclass"

The selection method is "unique".
Please note that I'm able to do an attribute_filtering with a content list fetch.

Any idea please ?

Thanks in advance :)

Jeremy B.

Tuesday 25 August 2009 8:21:32 am

Reply to myself, attribute_filtering is juste not availble with a search fetch :(

André R.

Tuesday 25 August 2009 11:09:53 am

You'll need ezfind to be able to do that, take a look in chapter 6 (especially the 'filter' section) in:
http://ez.no/doc/extensions/ez_find

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

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 31 2025 00:27:08
Script start
Timing: Jan 31 2025 00:27:08
Module start 'layout'
Timing: Jan 31 2025 00:27:08
Module start 'content'
Timing: Jan 31 2025 00:27:08
Module end 'content'
Timing: Jan 31 2025 00:27:08
Script end

Main resources:

Total runtime0.0397 sec
Peak memory usage8,192.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0072 588.2656151.2266
Module start 'layout' 0.00720.0037 739.4922220.7344
Module start 'content' 0.01090.0274 960.2266997.9609
Module end 'content' 0.03830.0014 1,958.187533.9922
Script end 0.0397  1,992.1797 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00276.7596140.0002
Check MTime0.00102.5700140.0001
Mysql Total
Database connection0.00133.314110.0013
Mysqli_queries0.00297.424530.0010
Looping result0.00000.032410.0000
Template Total0.00102.410.0010
Template load0.00071.857210.0007
Template processing0.00020.551410.0002
Override
Cache load0.00051.185710.0005
General
dbfile0.00030.697980.0000
String conversion0.00000.017440.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