custom facet result

Author Message

Romain Bremaud

Tuesday 08 March 2011 9:33:34 am

Hello everybody.

I would like to customize the search result with the following schema :

- Result of recherche

Search for "mario" returned 29 matches

6 news

- news 1 view : ez_find_line

- news 2 view : ez_find_line

- see all news

3 videos

- video 1 : ez_find_line

- video 2 : ez_find_line

- see all videos.

etc

I show only two result by class.

For the moment the basic search template use 2 loop separatly. One for the facet and the other for search result.

Is there a way to do a mix between the facet array and result array ? I could do a fecth for each class, but I think it is a bad utilisation of ezfind.

Romain

Romain Bremaud
Les clefs du net

Brandon Chambers

Tuesday 31 May 2011 1:53:07 pm

This might be accomplished via extended attribute filters? Or the dirty way would be to count the number of times a class occurs in looping through results and limit the displaying of them. :)

Brandon Chambers
brandon@granitehorizon.com
blog: http://blog.divdesigns.com
Granite Horizon / http://granitehorizon.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 02:52:07
Script start
Timing: Jan 18 2025 02:52:07
Module start 'layout'
Timing: Jan 18 2025 02:52:07
Module start 'content'
Timing: Jan 18 2025 02:52:09
Module end 'content'
Timing: Jan 18 2025 02:52:09
Script end

Main resources:

Total runtime1.3236 sec
Peak memory usage4,096.0000 KB
Database Queries56

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0082 589.3672152.6250
Module start 'layout' 0.00820.0048 741.992239.4531
Module start 'content' 0.01301.3089 781.4453528.8594
Module end 'content' 1.32190.0016 1,310.30478.3203
Script end 1.3235  1,318.6250 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.2560160.0002
Check MTime0.00140.1042160.0001
Mysql Total
Database connection0.00120.092210.0012
Mysqli_queries1.273796.2301560.0227
Looping result0.00060.0447540.0000
Template Total1.278596.620.6393
Template load0.00200.154820.0010
Template processing1.276596.441320.6382
Template load and register function0.00020.014210.0002
states
state_id_array0.00110.084010.0011
state_identifier_array0.00260.200020.0013
Override
Cache load0.00170.1284230.0001
Sytem overhead
Fetch class attribute can translate value0.00070.053020.0004
Fetch class attribute name0.00170.130930.0006
XML
Image XML parsing0.00080.057320.0004
class_abstraction
Instantiating content class attribute0.00000.000530.0000
General
dbfile0.00110.0865160.0001
String conversion0.00000.000840.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
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/header.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/header.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 9
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs