Forums / Developer / Probleme with the search

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