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.