[Solved] Override template of search result

Author Message

Mohamed Ben-Ahssene

Monday 30 March 2009 3:09:03 am

Hi

I learned how to make a template override for a section, but for a search result how can i do it?

justin kazadi

Monday 30 March 2009 3:39:22 am

Hi,
edit your search template search.tpl , check these line


{section name=SearchResult loop=$search_result show=$search_result sequence=array(bglight,bgdark)}
   {node_view_gui view=line sequence=$:sequence use_url_translation=$use_url_translation content_node=$:item}
{/section}

create your own view and replace the line view by your view. for exempl if your view is named

search_view 

you will have this code ( at the place of the code above)

{section name=SearchResult loop=$search_result show=$search_result sequence=array(bglight,bgdark)}
   {node_view_gui view=search_view sequence=$:sequence use_url_translation=$use_url_translation content_node=$:item}
{/section}

i think can help you .
good luck

The theory is when we know everything and nothing works.
The practice is when everything works and nobody knows why.
If the practice and theory are met, nothing works and we do not know why.

Albert Einstein

Mohamed Ben-Ahssene

Monday 30 March 2009 3:49:56 am

Hey Justin you are cool!
thank you very much it's what i want to know !
I understand ez publish in the right way! thank you

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 16:19:04
Script start
Timing: Jan 18 2025 16:19:04
Module start 'layout'
Timing: Jan 18 2025 16:19:04
Module start 'content'
Timing: Jan 18 2025 16:19:05
Module end 'content'
Timing: Jan 18 2025 16:19:05
Script end

Main resources:

Total runtime0.6384 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0073 589.1797152.6406
Module start 'layout' 0.00730.0044 741.820339.4766
Module start 'content' 0.01160.6253 781.2969533.7969
Module end 'content' 0.63700.0014 1,315.09388.1250
Script end 0.6383  1,323.2188 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.5611160.0002
Check MTime0.00140.2238160.0001
Mysql Total
Database connection0.00080.126910.0008
Mysqli_queries0.590892.5457570.0104
Looping result0.00050.0791550.0000
Template Total0.607095.120.3035
Template load0.00230.359720.0011
Template processing0.604794.731820.3024
Template load and register function0.00010.019710.0001
states
state_id_array0.00100.163510.0010
state_identifier_array0.00070.115320.0004
Override
Cache load0.00180.2828200.0001
Sytem overhead
Fetch class attribute can translate value0.00070.114320.0004
Fetch class attribute name0.00100.164040.0003
XML
Image XML parsing0.00070.107520.0003
class_abstraction
Instantiating content class attribute0.00000.001440.0000
General
dbfile0.00090.1381160.0001
String conversion0.00000.001840.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 18
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs