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! --------------------------------- Do you Yahoo!? Faith Hill - Exclusive Performances, Videos, & more faith.yahoo.com
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.
On Thu, 17 Oct 2002 19:02:53 -0700 (PDT) "michael.tañag" <almightymike@yahoo.com> 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!
in a page template, something like: <div tal:repeat="result here/Catalog"> <a href="#" tal:attributes="href result/getURL" tal:content="result/title_or_id">Result Title</a> </div> hth, -Casey
participants (3)
-
Casey Duncan -
Maik Jablonski -
michael.ta�ag