Filtering search results by class doesn't work...

Author Message

Uchendu Nwachukwu

Saturday 29 April 2006 9:41:45 pm

So the documentation says I can use the "class_id" attribute of the fetch(content, search) function to specify that it should only return results from a specific class.

Only it doesn't. It returns every matching result it can find.

Does anyone have any suggestions?

Ɓukasz Serwatka

Saturday 29 April 2006 11:16:45 pm

Hi,

You can pass get variable SearchContentClassID to content/advancedsearch or if you want control search from the template you need to change INI setting in

site.ini.append.php:
[SearchSettings]
SearchViewHandling=template

Then you can use the "class_id" attribute of the fetch(content, search) function in template. Also make sure that class_id is an integer not at string like "folder".

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Uchendu Nwachukwu

Sunday 30 April 2006 11:25:27 am

Thanks, making that .ini change fixed it.

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 31 2025 04:32:07
Script start
Timing: Jan 31 2025 04:32:07
Module start 'layout'
Timing: Jan 31 2025 04:32:07
Module start 'content'
Timing: Jan 31 2025 04:32:08
Module end 'content'
Timing: Jan 31 2025 04:32:08
Script end

Main resources:

Total runtime1.5061 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0076 588.2656151.2266
Module start 'layout' 0.00760.0046 739.492236.6953
Module start 'content' 0.01221.4926 776.1875929.4141
Module end 'content' 1.50490.0011 1,705.60167.8125
Script end 1.5060  1,713.4141 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.2609160.0002
Check MTime0.00130.0873160.0001
Mysql Total
Database connection0.00110.069810.0011
Mysqli_queries1.451296.3544570.0255
Looping result0.00060.0394550.0000
Template Total1.463497.220.7317
Template load0.00220.144920.0011
Template processing1.461297.018320.7306
Template load and register function0.00150.097310.0015
states
state_id_array0.00240.160710.0024
state_identifier_array0.00160.103120.0008
Override
Cache load0.00160.1060140.0001
Sytem overhead
Fetch class attribute can translate value0.00090.059820.0005
Fetch class attribute name0.00260.175640.0007
XML
Image XML parsing0.00080.052520.0004
class_abstraction
Instantiating content class attribute0.00000.000640.0000
General
dbfile0.00110.0762180.0001
String conversion0.00010.007740.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/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: 11
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs