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

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 18 2025 22:13:24
Script start
Timing: Jan 18 2025 22:13:24
Module start 'layout'
Timing: Jan 18 2025 22:13:24
Module start 'content'
Timing: Jan 18 2025 22:13:25
Module end 'content'
Timing: Jan 18 2025 22:13:25
Script end

Main resources:

Total runtime0.7552 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 589.5859152.6406
Module start 'layout' 0.00600.0035 742.226639.4766
Module start 'content' 0.00950.7445 781.7031427.4453
Module end 'content' 0.75400.0012 1,209.14848.1250
Script end 0.7552  1,217.2734 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.4139160.0002
Check MTime0.00130.1749160.0001
Mysql Total
Database connection0.00120.159710.0012
Mysqli_queries0.710294.0419520.0137
Looping result0.00050.0615500.0000
Template Total0.709694.020.3548
Template load0.00230.302720.0011
Template processing0.707393.654520.3537
Template load and register function0.00010.019910.0001
states
state_id_array0.00630.832210.0063
state_identifier_array0.00160.206720.0008
Override
Cache load0.00190.2534250.0001
Sytem overhead
Fetch class attribute can translate value0.00050.071910.0005
Fetch class attribute name0.00190.252020.0010
XML
Image XML parsing0.00020.020410.0002
class_abstraction
Instantiating content class attribute0.00000.000720.0000
General
dbfile0.00130.1711100.0001
String conversion0.00000.001340.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
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs