Forums / Developer / Custom search: results and searchform in the same page

Custom search: results and searchform in the same page

Author Message

Stefano Vaghi

Monday 04 August 2008 3:04:35 am

Hi, I have customized "advancedsearch.tpl" to create "mypersonalsearch.tpl" with some features. I'd like to modify it to show the results in the same page.

The behaviour should be something like this:
- I go to the search form and search for something
- The searchpage appears again and it has both the search result and the the same identical searchform of "mypersonalsearch.tpl" to do an other search

Thanks in advance for suggestions.

Stefano Vaghi

Tuesday 05 August 2008 3:23:39 am

Well...I have found a solution:

- copy advancedsearch.tpl in "..\extension\ezwebin\design\ezwebin\override\templates\content"

- rename and customize it (for example: "mysearch.tpl")

- copy "mysearch.tpl" into "..\extension\ezwebin\design\ezwebin\templates\content\advancedsearch"

- add the following lines in "override.ini.append":

[mysearch_results]
Source=content/advancedsearch/mysearch.tpl
MatchFile=content/mysearch.tpl
Subdir=templates

[mysearch]
Source=node/view/full.tpl
MatchFile=content/mysearch.tpl
Subdir=templates
Match[node]=*number_of_the_node*

- start to search :)

Bye