Sorting Search Results by Section

Author Message

Alex Jones

Wednesday 25 February 2004 7:39:16 am

How can I set up the advanced search to sort the results by Section? I have tried adding <i>"sort_by", array("section", true())</i> to <i>{set search=fetch...</i> at the top of my advancedsearch.tpl template (which I know is overriding properly), but it continues to mix the results.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

James Packham

Thursday 26 February 2004 7:35:10 am

You could try fetching a list of sections, then looping through through your search results, but only showing results that have a matching section attribute. That also has the advantage of your being able to change the order of the sections appearing and excluding sections from searches.

Regards,

James

Alex Jones

Thursday 26 February 2004 1:18:37 pm

Yeah, I had pondered that, but was hoping there was a method built into the standard/advanced search functionality. Ahh well. Thanks for the feedback James!

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

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 19 2025 12:53:14
Script start
Timing: Jan 19 2025 12:53:14
Module start 'layout'
Timing: Jan 19 2025 12:53:14
Module start 'content'
Timing: Jan 19 2025 12:53:14
Module end 'content'
Timing: Jan 19 2025 12:53:14
Script end

Main resources:

Total runtime0.0195 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 589.1797152.6250
Module start 'layout' 0.00600.0029 741.804739.4453
Module start 'content' 0.00880.0086 781.250089.2422
Module end 'content' 0.01750.0020 870.492234.3047
Script end 0.0195  904.7969 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002814.2081140.0002
Check MTime0.00115.7282140.0001
Mysql Total
Database connection0.00083.948210.0008
Mysqli_queries0.002713.907830.0009
Looping result0.00000.076910.0000
Template Total0.00168.310.0016
Template load0.00094.624510.0009
Template processing0.00073.671110.0007
Override
Cache load0.00073.353610.0007
General
dbfile0.003920.038880.0005
String conversion0.00000.056240.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