EzFind 2 - custom filter

Author Message

Sylvain Gogel

Tuesday 31 March 2009 5:12:11 am

the doc says:

filter
The filter is used when creating faceted search templates for drill-down navigation. Filters
are used to limit the search result set without altering the relevancy sort order. Facet
results contain filter definitions that can be used directly. Custom filter definitions can also
be created.

How can i create such a custom filter definition?

--
http://www.ecedi.fr
Agence Web, Créa/Conseils, Accessibilité
eZPublish, Drupal, Zend, Symfony

Emmanuel Courmont

Wednesday 01 April 2009 6:55:35 pm

Hi Sylvain,

You can create a filter in your search form. Here is an example for a dropdown box:

 <select name="filter[]">
  <option value="{contact($content_class_identifier, '/', $attribute_identifier, ':', $value1}">value1</option>
  <option value="{contact($content_class_identifier, '/', $attribute_identifier, ':', $value2}">value2</option>
  <option value="{contact($content_class_identifier, '/', $attribute_identifier, ':', $value1}">value2</option>
</select>

You can get them with the new fetch operator:

  {$filterParameters = fetch( ezfind, filterParameters )}

Note: you can use filters without the facets.

Regards.

Sylvain Gogel

Thursday 02 April 2009 1:05:40 am

Ha, this is a custom filter?

i thought it was something that allow more than the std syntax

thanks

--
http://www.ecedi.fr
Agence Web, Créa/Conseils, Accessibilité
eZPublish, Drupal, Zend, Symfony

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 30 2025 21:09:15
Script start
Timing: Jan 30 2025 21:09:15
Module start 'layout'
Timing: Jan 30 2025 21:09:15
Module start 'content'
Timing: Jan 30 2025 21:09:15
Module end 'content'
Timing: Jan 30 2025 21:09:15
Script end

Main resources:

Total runtime0.0259 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0047 588.1563151.2109
Module start 'layout' 0.00470.0040 739.3672220.6875
Module start 'content' 0.00870.0154 960.0547998.8984
Module end 'content' 0.02420.0017 1,958.953133.9922
Script end 0.0258  1,992.9453 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003011.7196140.0002
Check MTime0.00135.0826140.0001
Mysql Total
Database connection0.00062.164410.0006
Mysqli_queries0.00218.139830.0007
Looping result0.00000.054410.0000
Template Total0.00124.510.0012
Template load0.00093.493110.0009
Template processing0.00031.020010.0003
Override
Cache load0.00062.322910.0006
General
dbfile0.00186.825080.0002
String conversion0.00000.031340.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