Probleme with the search

Author Message

Anthony M.

Friday 20 October 2006 3:05:08 am

Hello,

i've got a problem with my search.
I didn't see in the documentation the explanation of that :

{let search=true()}
...
{/let}

can you help me ??

and here is my code for the search :

{section show=$use_template_search}

{set page_limit=10}
{set $search=fetch('content', 'search', hash( 'text', $search_text, 'class_id', array( '24','25' ) ))}
{set search_result=$search['SearchResult']}
{set search_count=$search['SearchCount']}
{set stop_word_array=$search['StopWordArray']}
{set search_data=$search}

{/section}

where is the variable '$use_template_search' ?? and there are some results from an other class than 24 or 25, why ?? the search isn't allowed in the class...

Thanks for your help

Anthony

Damien Pobel

Saturday 21 October 2006 6:46:06 am

Hi Anthony,

In fact, the value of $use_template_search is the value of the settings SearchViewHandling [1] which tells eZ publish to use the template code or a builtin function in PHP. If you need some special parameters (like class restriction) you need to set it to the value <b>template</b>.

[1] http://ez.no/doc/ez_publish/technical_manual/3_8/reference/configuration_files/site_ini/searchsettings/searchviewhandling

Damien
Planet eZ Publish.fr : http://www.planet-ezpublish.fr
Certification : http://auth.ez.no/certification/verify/372448
Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish

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 00:15:45
Script start
Timing: Jan 19 2025 00:15:45
Module start 'layout'
Timing: Jan 19 2025 00:15:45
Module start 'content'
Timing: Jan 19 2025 00:15:45
Module end 'content'
Timing: Jan 19 2025 00:15:45
Script end

Main resources:

Total runtime0.8269 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.0059 587.9141152.6250
Module start 'layout' 0.00590.0031 740.539139.4453
Module start 'content' 0.00900.8162 779.9844526.2188
Module end 'content' 0.82520.0016 1,306.20318.1641
Script end 0.8269  1,314.3672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3845160.0002
Check MTime0.00130.1523160.0001
Mysql Total
Database connection0.00060.073810.0006
Mysqli_queries0.782794.6573540.0145
Looping result0.00050.0592520.0000
Template Total0.790695.620.3953
Template load0.00240.290220.0012
Template processing0.788295.322220.3941
Template load and register function0.00010.013610.0001
states
state_id_array0.00090.114410.0009
state_identifier_array0.00140.171020.0007
Override
Cache load0.00180.2187170.0001
Sytem overhead
Fetch class attribute can translate value0.00080.095220.0004
Fetch class attribute name0.00100.125430.0003
XML
Image XML parsing0.00060.076820.0003
class_abstraction
Instantiating content class attribute0.00000.001030.0000
General
dbfile0.00080.0966160.0000
String conversion0.00000.001140.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
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/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
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: 13
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs