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.