[Zope] Puzzled re ZCatalog and Zope.org /SiteIndex

Martijn Pieters mj@antraciet.nl
Wed, 03 Nov 1999 16:47:20 +0100


At 16:21 03/11/99 , Jeff Rush wrote:
>Hmmm, I don't quite understand.  Are you saying that ya'll created and
>placed in the root folder, say, an external method named 'date' that does
>the equivalent of the following in a DTML Method
>
>      <dtml-return bobobase_modification_time>
>
>And then you added a field called 'date' to the ZCatalog metadata
>and index tabs?
>
>This seems to work here with a DTML Method -- why was an external
>method necessary?

Because Catalog doesn't call DTML Methods with the usual context, so the 
can't determine what to call bobobase_modification_time on.


>Also doesn't this mean that the ZCatalog instance
>is duplicating data, storing the date under both the 
>'bobobase_modification_time'
>(for backward compatibility) and 'date' columns?  This seems like a bit
>of overhead just to be able to use the shorter name in search DTML,
>or am I missing the benefit/intent?

Date is a clearer name. Also no duplication is necessary, just remove the 
bobobase_modification_time column.


>{also to construct the 'url' attribute, how did you obtain the url of an 
>arbitrary
>  object -- the generic Zope equivalent of "getpath(record_id)"?}

absolute_url()

--
Martijn Pieters, Web Developer
| Antraciet http://www.antraciet.nl
| Tel: +31-35-7502100 Fax: +31-35-7502111
| mailto:mj@antraciet.nl http://www.antraciet.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
------------------------------------------