This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Developer » Attribute filtering in node fetching...
expandshrink

Attribute filtering in node fetching operations

Attribute filtering in node fetching operations

Thursday 15 July 2004 7:15:42 pm - 4 replies

I'd like to use an attribute filter which checks if a given value is in a multivalue-attribute of content objects. However, attribute filtering does not support the sql-operator IN, which checks if a given value is in a multivalue-database field.

Are there any attribute filter extensions around which allow for filter statements like

ExtendedAttributeFilter,array(array('value x' 'IN' 'multi_value_field y'))

I am currently not keen to write this one myself blunk.gif Emoticon

Friday 16 July 2004 2:10:05 pm

Hi Volker

I added IN and LIKE to the attribute filter operators in node fetching. I use it in a form where user can click one or more status checkboxes to filter the display of TODO items. The IN filter expects an array like (1,3,5) which you have to provide in the template and is actually passed as extra parameters to the templates in my implementation.

I think this can be useful for you too, I'll upload the modified class ezcontentobjecttreenode to pubsvn later today.

hth

-paul

Saturday 17 July 2004 4:20:25 pm

Hi Paul,

you're really a great blockbuster blunk.gif Emoticon

Thanks a lot & kind regards.

BTW. I am going to deploy this feature in new Edition PieServer for ezp Rel. 3.4 blunk.gif Emoticon

Volker

Saturday 17 July 2004 4:32:43 pm

Sorry,

Got connection problems (vpn from home). I'll have to do it monday. I hope it can wait until then, the mods are really very simple

Best regards

-paul

Tuesday 20 July 2004 6:15:56 pm

Hello

Only could do it now sad.gif Emoticon

You can find my mod in the community svn server adding 'like' and 'in' attribute filters:

http://pubsvn.ez.no/viewcvs/commu.../classes/ezcontentobjecttreenode.php

I patched against rev 7077 of the trunk. If you inspect the diffs, you see it is all very easy to do.

To feed an 'in' array, I usually assemble this array as a string from checkboxes inside a form. The form lets the user specify some nifty filters in a trouble ticket like interface.

If you like it, you can fire another suggestion to the ez crew to incorporate both filter options in the standard code base (I already did without success).

Best regards

-paul

(gone until next monday)

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from