Forums / Developer / How can design Search

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

eZ debug

Timing: Jan 31 2025 04:14:24
Script start
Timing: Jan 31 2025 04:14:24
Module start 'content'
Timing: Jan 31 2025 04:14:24
Module end 'content'
Timing: Jan 31 2025 04:14:24
Script end

Main resources:

Total runtime0.1162 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 587.8281180.8438
Module start 'content' 0.00610.0059 768.6719101.9609
Module end 'content' 0.01200.1042 870.6328529.7500
Script end 0.1161  1,400.3828 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00342.9575200.0002
Check MTime0.00131.1562200.0001
Mysql Total
Database connection0.00070.600610.0007
Mysqli_queries0.071961.88841410.0005
Looping result0.00090.74771390.0000
Template Total0.103989.410.1039
Template load0.00080.661110.0008
Template processing0.103188.733910.1031
Override
Cache load0.00050.444210.0005
Sytem overhead
Fetch class attribute can translate value0.00040.359710.0004
XML
Image XML parsing0.00020.192710.0002
General
dbfile0.01018.7099200.0005
String conversion0.00000.025030.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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