[Zope] ZCatalog

Chris McDonough chrism@digicool.com
Mon, 17 Jul 2000 00:12:48 -0400


Jonathan Desp wrote:
> 
> if you know the answer just email me at jonathandesp@atomasoft.com (my site
> is almost ready at www.atomasoft.com , there are 2 pages to write + the
> search engine to fix, is it possible for zope to use ->
> http://www.htdig.org/  ?)

I don't think HTDig can index Zope content because Zope content isn't
available via the filesystem.

> 
> I'd like to know something:
> 
> In the article here:
> 
>  http://www.zope.org/Documentation/How-To/ZCatalogTutorial
> 
> they are talking about this:
> 
> In the source of report, find the following line::
> 
>             <tr><!--#var title--></tr>
> 
> Replace it with this::
> 
>             <tr>
>              <a href="<!--#var "catalog.getpath(data_record_id_)"-->">
>               <!--#var title-->
>              </a>
>             </tr>
> 
> ____________________
> 
> What can happen when I don't have this "<tr><!--#var title--></tr>" ? In my
> management view at "report"

The tutorial still uses the old DTML "SSI-style" syntax.  This syntax
has been replaced with another that would make this line look like:

<dtml-var title>

You would replace it with:

<a href="<dtml-var "catalog.getpath(data_record_id_)">">
<dtml-var title>

> Also, where I can edit "getpath", where is this file ?

It's not a file.  It's a method of the catalog object.  In Python.  You
don't need to edit it. 

> 
> "Fortunately, ZCatalog provides a utility function for going from result
> objects to the object's path. It is called, aptly enough, getpath. getpath
> expects to be passed the unique integer identifier of the cataloged object.
> Results store that id as data_record_id_."
> 
> Commit this change, and perform another search. Now the title can be clicked
> on to take you to the full page.
> 
> "I cannot commit this change because I don't find "<tr><!--#var
> title--></tr>"  first of all, secondly I cannot find "getpath", and I don't
> know what to do inside the file "getpath", what  I need to edit etc..
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )