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.