[Zope] Re: Hi! need help on searching objects.

Maik Jablonski maik.jablonski@uni-bielefeld.de
Fri, 18 Oct 2002 09:07:17 +0200


michael.taņag wrote:
> hi!
> 
> I'm new to zope. i'm developing a page that needs to search for files 
> inside the site. following instructions on the web on how to use 
> zcatalog, i was able to make a simple search engine. It showed the 
> results that I needed. My problem is how do I make these results, say 
> the ID, point to the object it refers to? Can anyone help me. Thank you!
> 

this question was just discussed yesterday... please send no HTML-mails.

cheers, maik

--------------------

Sven Rudolph wrote:

<dtml-in MYZCATALOG>
<a href="<dtml-var absolute_url>"><dtml-var  title_or_id></a><br>
</dtml-in>

that does not work if you haven't stored the metadata for absolute_url and
title in your ZCatalog...;-)

another approach would be:
  put the current object from the ZCatalog on the namespace:

<dtml-with "getobject(data_record_id_)">
  <a href="<dtml-var absolute_url>"><dtml-var  title_or_id></a><br>
</dtml-with>

This would result in a little performance loss because
you have to wake up each matching object just to get the url and the id.