Forums / Developer / Most effiecient way to filter

Most effiecient way to filter

Author Message

Brendan Pike

Sunday 27 August 2006 5:51:35 am

I do recall seeing a conversation about this some time ago but couldn't locate it.

I'm using several view_parameters to allow users to filter a fetch of usually around 200 - 300 objects. Like only show objects with a location of node_id, 432 and a ezselect state of 3 etc. My question is what is best method of filtering. Is it with a {section-exclude} within the loop or is there a way to perform the filtering within the fetch itself?

www.dbinformatics.com.au

We are always interested in hearing from experienced eZ PHP programmers and eZ template designers interested in contract work.

Kristof Coomans

Sunday 27 August 2006 11:19:34 am

Hello Brendan

Info on filtering attributes of the selection datatype (single select only):
http://ez.no/community/forum/setup_design/filter_content_passing_values_from_url

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Brendan Pike

Sunday 27 August 2006 8:48:39 pm

Thanks Kristof, that thread was very informative. After reading that thread I realised I am trying to filter a "ebhanced selection" datatype. I was hoping to avoid the complexity of the extended_attribute_filter but its starting to feel that's the only way. Perhaps I shouldn't be reaching for the "enhanced selector" quite so often after all.

Can you give me your opinion on how to filter on:
A. Enhanced Selectors
B. Node locations, (inspect locations and filter out certain nodes)

Achieving this with section-excludes within a loop is relatively easy but I thought it was a slow method since your fetching larger volumes of objects.

Thanks for any tips.

www.dbinformatics.com.au

We are always interested in hearing from experienced eZ PHP programmers and eZ template designers interested in contract work.

Kristof Coomans

Monday 28 August 2006 1:43:36 am

With the enhanced selection datatype, you can just use the identifier of your option as the filter value. Again this only works for a single selection.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org