Search Result output Redirect

Author Message

Lazaro Ferreira

Monday 30 August 2004 2:51:50 am

Hi,

We need help to make search result appears in a different page
(or section). By default Search Result appears on the result content
of the same page where the search form is, In previous EZP versions
were possible to redirect Search Result to another page,

how can we do that in a simple way ?

Thanks

Lazaro Ferreira

Lazaro
http://www.mzbusiness.com

Ole Morten Halvorsen

Monday 30 August 2004 4:09:47 am

Im not sure if you can redirect, but you can do a search by using template code instead. Have a look at http://ez.no/ez_publish/documentation/reference/data_fetching/content/search

Ole M.

Senior Software Engineer - Vision with Technology

http://www.visionwt.com
http://www.omh.cc
http://www.twitter.com/omh

eZ Certified Developer
http://ez.no/certification/verify/358441
http://ez.no/certification/verify/272578

Lazaro Ferreira

Monday 30 August 2004 9:55:46 am

Hi,

That's ok

But, would be nice a simple redirect of search result

Doing by building a new search result template, is harder and worthless for our purposes, because we don't want to change standard ezp search result behaviour

We only want to make search result output going to another template, not the same from where it was launched

There was a suggestion from EZP support pointing to the use of user defined post variables, but from reading EZP search result php code, there is not support for redirection parameter there

We would like to hear, how others have solved this issue in a simple way

Thanks
Lazaro

Lazaro
http://www.mzbusiness.com

Paul Borgermans

Monday 30 August 2004 10:05:48 am

Lazaro,

Do you mean you want to have a different pagelayout for all searches? Or depending from where it is launched?

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Lazaro Ferreira

Monday 30 August 2004 10:20:29 am

Hi Paul,

Depending from where it is lauched,

i.e: if launched from the Home Page we don't want the output to the home page, or at least, we would like to have a way to know that this time it is opening from a search result, so we can i.e : put some sections to hide some layout, do you understand Paul ?

This is already implemented at ez.no home page, but we don't guess how to do it without customizing search result itself

Thanks

Lazaro

Lazaro
http://www.mzbusiness.com

Paul Borgermans

Monday 30 August 2004 11:30:54 am

OK,

First, I don't think this is implemented in ez.no, it is just teh default pagelayout that is used for search results.

If your default pagelayout is already used and don't want to cahnge that, you will have to patch /kernel/content/search.php:

Find the following code near the end of the file

$Result = array();
$Result['content'] =& $tpl->fetch( "design:content/search.tpl" );
$Result['path'] = array( array( 'text' => ezi18n( 'kernel/content', 'Search' ),
                                'url' => false ) );

and add:

$Result['pagelayout'] = 'pagelayout_search.tpl';

Now in your design/siteaccess/templates, create a template pagelayout_search.tpl according to your wishes

hth

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Lazaro Ferreira

Tuesday 31 August 2004 3:16:10 am

Paul,

Thanks,

Lazaro

Lazaro
http://www.mzbusiness.com

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

Main resources:

Total runtime0.0192 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0079 590.2891152.6250
Module start 'layout' 0.00790.0033 742.914139.4453
Module start 'content' 0.01120.0058 782.359497.4453
Module end 'content' 0.01700.0022 879.804738.3047
Script end 0.0191  918.1094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003216.8952140.0002
Check MTime0.00168.1160140.0001
Mysql Total
Database connection0.00104.977410.0010
Mysqli_queries0.003116.410030.0010
Looping result0.00000.083310.0000
Template Total0.00178.810.0017
Template load0.00094.727310.0009
Template processing0.00084.090410.0008
Override
Cache load0.00063.125010.0006
General
dbfile0.00031.770380.0000
String conversion0.00000.046040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs