Searching/Filtering

Author Message

Robert Munteanu

Wednesday 15 December 2004 9:17:31 am

Hello,

I want to create a filtering form for a certain class, in which the attributes can be given values which will act as filters ( e.g. All cities from Great Britain ).

How can I achieve that?

Thanks,

Robert

Lazaro Ferreira

Wednesday 15 December 2004 1:32:41 pm

Hi,

In ezp, this is possivel :

1) programming ezp templates

2) extending ezp (php programming)

3) combining both

---------------------------------------------------
I will try to give you a briefing using #1 option

a) Override the full view template of a folder ( i.e: the folder under which you are storing the custom objects you want to filter in) to include your search or filter form
b) Submit the form to itself
c) Use ezp ezhttp template operator

http://ez.no/ez_publish/documentation/reference/template_operators/data_extraction/ezhttp

to get the value posted ( i.e: the cities' code )
d) Call ezpublish data extraction function 'fetch'

http://ez.no/ez_publish/documentation/reference/data_fetching

and pass the values got in c) as filter_attribute parameter value
e) list the results (here you can reuse the listing code already in place)
f) override google navigator template to support multiple page result navigation (only need it if listing extend over multiple pages)

Lazaro
http://www.mzbusiness.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 18 2025 16:33:00
Script start
Timing: Jan 18 2025 16:33:00
Module start 'layout'
Timing: Jan 18 2025 16:33:00
Module start 'content'
Timing: Jan 18 2025 16:33:02
Module end 'content'
Timing: Jan 18 2025 16:33:02
Script end

Main resources:

Total runtime1.4774 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 587.8125152.6094
Module start 'layout' 0.00530.0036 740.421939.4141
Module start 'content' 0.00891.4670 779.8359492.0547
Module end 'content' 1.47590.0015 1,271.89068.1875
Script end 1.4773  1,280.0781 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.2416160.0002
Check MTime0.00140.0951160.0001
Mysql Total
Database connection0.00090.058410.0009
Mysqli_queries1.427496.6204540.0264
Looping result0.00060.0436520.0000
Template Total1.444797.820.7223
Template load0.00330.222120.0016
Template processing1.441497.562120.7207
Template load and register function0.00030.020810.0003
states
state_id_array0.00080.056410.0008
state_identifier_array0.00170.115720.0009
Override
Cache load0.00260.1789270.0001
Sytem overhead
Fetch class attribute can translate value0.00090.063420.0005
Fetch class attribute name0.00100.064620.0005
XML
Image XML parsing0.00020.013720.0001
class_abstraction
Instantiating content class attribute0.00000.000420.0000
General
dbfile0.00070.0485100.0001
String conversion0.00000.000540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs