Attribute level filtering on enhanced object relation

Author Message

Bertrand Dunogier

Tuesday 20 September 2005 7:21:55 am

I have a project content class, with district, location and area attributes; these attributes are enhanced object relations, entered using single select list.

I'd like to search every project in location X and / or district Y and / or area Z (an area belongs to a location and a location belongs to a district, so the and / or part is not critical... ^^)

Anyway I'm having a BIG headache on the search engine and it's attribute level search. Sometimes I get relevant results, sometimes not... really depends on my search.

Now I'm trying to build custom lists using content/list and attribute_filter, but so far, not good...

fetch('content', 'list', hash(..., attribute_filter, array(array('projet/commune', '=', '???')))

As far as I understand it, I can't use the city name, since EOR stores object IDs, but since it stores a list, I can't use the ID itself either...

Any suggestion ? I'm about to rip my head apart ;)

Xavier Dutoit

Wednesday 21 September 2005 4:03:54 am

Hi,

The easiest seem to be to get the list of the reverse related objects to a district, location or area as eor stores the district, location or area as related objects.

With 3.6.x, you have template operators for that. Have a look at the contrib page, that should give you some hints.

X+

http://www.sydesy.com

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 04:16:43
Script start
Timing: Jan 31 2025 04:16:43
Module start 'layout'
Timing: Jan 31 2025 04:16:43
Module start 'content'
Timing: Jan 31 2025 04:16:43
Module end 'content'
Timing: Jan 31 2025 04:16:43
Script end

Main resources:

Total runtime0.0116 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.0043 588.3594151.2266
Module start 'layout' 0.00430.0022 739.585936.6797
Module start 'content' 0.00650.0038 776.265690.2188
Module end 'content' 0.01030.0013 866.484429.9922
Script end 0.0115  896.4766 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002219.1137140.0002
Check MTime0.00108.4459140.0001
Mysql Total
Database connection0.00065.114210.0006
Mysqli_queries0.001815.220830.0006
Looping result0.00000.105210.0000
Template Total0.00108.710.0010
Template load0.00086.801710.0008
Template processing0.00021.904210.0002
Override
Cache load0.00064.914110.0006
General
dbfile0.00032.572680.0000
String conversion0.00000.049540.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