Forums / Developer / Search Result output Redirect

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

eZ debug

Timing: Jan 19 2025 09:49:36
Script start
Timing: Jan 19 2025 09:49:36
Module start 'content'
Timing: Jan 19 2025 09:49:38
Module end 'content'
Timing: Jan 19 2025 09:49:38
Script end

Main resources:

Total runtime1.6074 sec
Peak memory usage4,096.0000 KB
Database Queries208

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0100 588.9531180.8359
Module start 'content' 0.01001.4172 769.7891624.1328
Module end 'content' 1.42720.1802 1,393.9219341.0625
Script end 1.6074  1,734.9844 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00500.3134210.0002
Check MTime0.00170.1065210.0001
Mysql Total
Database connection0.00120.073310.0012
Mysqli_queries1.512594.09102080.0073
Looping result0.00230.14592060.0000
Template Total1.565197.420.7826
Template load0.00720.450920.0036
Template processing1.557996.915920.7789
Template load and register function0.00040.025010.0004
states
state_id_array0.00180.110410.0018
state_identifier_array0.00130.079720.0006
Override
Cache load0.00680.4261520.0001
Sytem overhead
Fetch class attribute can translate value0.00220.140040.0006
Fetch class attribute name0.00160.097480.0002
XML
Image XML parsing0.00100.063540.0003
class_abstraction
Instantiating content class attribute0.00000.002090.0000
General
dbfile0.00330.2074280.0001
String conversion0.00000.001330.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 26
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs