Search results in a custom template

Search results in a custom template

Thursday 11 March 2004 9:44:14 am - 2 replies

Author Message

Hans Melis

Thursday 11 March 2004 12:28:14 pm

Hi Paul,

The simple search page consists of 3 templates: content/search.tpl, content/searchresult.tpl and node/view/search.tpl.

content/search.tpl contains the text fields, the search button, etc.

content/searchresult.tpl manages the search results and sends parameters to the google navigator

node/view/search.tpl is the viewmode used for the actual objects being displayed (like node/view/line.tpl). It's called like {node_view_gui view=search content_node=....}. So to control what's displayed for each object found, you need to override the node/view/search.tpl for an object's class.

hth
--
Hans

Hans
http://blog.hansmelis.be

paul cozens

Thursday 11 March 2004 4:58:33 pm

Hi Hans,

many thanks for your prompt reply it worked out a treat. I simply copied the original template override, created a new blank override for the (correct) search template and pasted. The only bit I didn't quite understand was having to remove the table tags but I assume this template is called similar to a subroutine from the searchresult.tpl file.

thanks again you have saved hours of trial and error.

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.