How can design Search

Author Message

Muhammad Khalid Majeed

Thursday 06 May 2004 3:22:29 am

I am trying to develop search page for the site. But when the search reulst come it also display the Class name. While i want my own design like as in News. Can anybody help me

Muhammad Khalid
Software Engineer
www.webgurru.net

Eirik Alfstad Johansen

Thursday 06 May 2004 3:34:16 am

Hi Muhammad,

Try overriding the content/search.tpl template.

Sincerely,

Eirik Johansen
http://www.netmaking.no/

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

John Mina

Thursday 06 May 2004 5:21:58 am

Hi Muhamed
Try to go to the file existing at design/[your site name]/override/template/search.tpl

it is the one that is responsible for viewing your search results
About the advanced search you will find it in the design/standard/content/advancedsearch.tpl ,

Hope this wil lhelp you
Take care
JOhn

Muhammad Khalid Majeed

Monday 10 May 2004 5:49:56 am

I trying to customize my templete but fail... the default template code for the searhresult is

{* Default search results lister *}
{let use_url_translation=ezini('URLTranslator','Translation')|eq('enabled')}

{section show=$search_result}
<table class="list" width="100%" border="0" cellspacing="0" cellpadding="0">
<th>{"Name"|i18n("design/standard/content/search")}</th>
<th width="1">{"Class"|i18n("design/standard/content/search")}</th>
<tr>
{section name=SearchResult loop=$search_result show=$search_result sequence=array(bglight,bgdark)}
{node_view_gui view=search sequence=$:sequence use_url_translation=$use_url_translation content_node=$:item}
{delimiter modulo=1}
</tr>
<tr>
{/delimiter}
{section-else}
{/section}
</tr>
</table>
{/section}

{/let}

and it display the result like

Search Result Class

while i don't want to display the cleass also need to change the design. as in the default news design. HOw can i handle {node_view_gui ...} for this.

Is there any method that i can design my own "View"???
I realy need urgent help

Muhammad Khalid
Software Engineer
www.webgurru.net

Vanessa Merle

Monday 10 May 2004 6:19:54 am

Override the <b>/node/view/search.tpl</b> template.

Vanessa

Muhammad Khalid Majeed

Monday 10 May 2004 9:58:05 pm

I have overriding the search.tpl by my own design by the following code

<table width="450" border="0" align="center" cellpadding="0" cellspacing="0">
{let use_url_translation=ezini('URLTranslator','Translation')|eq('enabled')}
{section show=$search_result} {section name=SearchResult
loop=$search_result show=$search_result sequence=array(bglight,bgdark)}
<tr>
<td>{$:item.description}-<a href={$:item.url_alias|ezurl}>{node_view_gui
sequence=$:sequence view=text use_url_translation=$use_url_translation
content_node=$:item}</a> ... {$:item.url_alias}</td>
</tr>
{/section} {/section}{/let}
<tr>
<td>
{include name=Navigator uri='design:navigator/google.tpl'
page_uri=concat('/content/search') page_uri_suffix=concat('?SearchText=',$search_text|urlencode,$search_timestamp|gt(0)|choose('',concat('&SearchTimestamp=',$search_timestamp)))
item_count=$search_count view_parameters=$view_parameters
item_limit=$page_limit} </td>
</tr>

</table>

But still my result view is very awfull. I also want to display the description.

While if you see the test demo of News at
http://demo.ezpublish.no/news/content/search?SearchText=new&SearchButton=Search

It looks very attractive with whole detail.

I have check the sample code but can't generate the same look.

Please Help me.

Muhammad Khalid
Software Engineer
www.webgurru.net

Vanessa Merle

Tuesday 11 May 2004 12:30:30 am

You have overriding the content/search.tpl.

But now, override the node/view/search.tpl (it's different file)

To display the description, try :

{default use_url_translation=false()}
    <td>
       <a href={$node.url_alias|ezurl}>{$node.name|wash}</a>    
    </td>
    <td>
       {$node.object.data_map.description}
    </td>
{/default}

Vanessa

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 31 2025 04:23:24
Script start
Timing: Jan 31 2025 04:23:24
Module start 'layout'
Timing: Jan 31 2025 04:23:24
Module start 'content'
Timing: Jan 31 2025 04:23:24
Module end 'content'
Timing: Jan 31 2025 04:23:24
Script end

Main resources:

Total runtime0.0150 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 588.1094151.1953
Module start 'layout' 0.00590.0031 739.304736.6172
Module start 'content' 0.00900.0046 775.921998.2500
Module end 'content' 0.01360.0014 874.171937.9922
Script end 0.0150  912.1641 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002415.8311140.0002
Check MTime0.00106.8747140.0001
Mysql Total
Database connection0.00085.570510.0008
Mysqli_queries0.003120.793930.0010
Looping result0.00000.153910.0000
Template Total0.00127.710.0012
Template load0.00095.856110.0009
Template processing0.00031.777010.0003
Override
Cache load0.00064.245710.0006
General
dbfile0.00031.940480.0000
String conversion0.00000.068240.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