Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.



Sets if searches are handled by the search view or in the template.




This setting has two options

  •  default - The view code does the search and passes the result to template. The template is only responsible for displaying the result.
  •  template - The template does the search and passes the result back to the view code. This way you have to "program" the search yourself providing more flexibility.

This setting is taken in consideration in the default search templates, by the use of $use_template_search variable, as shown in the following example:

{def $search=false()}
{if $use_template_search}
    {set $page_limit=10}
    {set $search=fetch(content,search,
    {set $search_result=$search['SearchResult']}
    {set $search_count=$search['SearchCount']}
    {set $stop_word_array=$search['StopWordArray']}
    {set $search_data=$search}

Note: Some of the default search templates use an if condition, others use section. Be aware that section is an already deprecated template control structure. 

Frederik Holljen (01/03/2005 11:54 am)

Ricardo Correia (03/07/2013 4:18 pm)

Frederik Holljen, Ricardo Correia


There are no comments.