On 6 Nov 2000, at 21:46, Dieter Maurer wrote:
Wolfgang Strobl writes:
"Finding"a bunch of DTML Documents into a Zcatalog is easy. But how to do that programmatically? I haven't even found a way of doing that for a single DMTL Document. You call the catalog with your search terms as keyword paramters:
<dtml-in "catalog(principia_search_source='cool and new')"> .... </dtml-in>
Have a look at the two ZCatalog tutorials on zope.org.
Who said anything about searching? :-) A ZCatalogs management interface contains a function "Find Items to ZCatalog". This function performs a recursive search and adds all objects matching the specified criteria to the Catalog. This works quite well with DMTL Documents, as long as one does it via the management interface. I asked about how to perform this function (to spell it out again: _adding_ a _DTML Document_) programmatically, i.e. via DTML, of from Python code. There is a How-To "Adding ZClass Instances Programmatically", and a lot of gobbledigoop about when, how and why. But I haven't found anything about how to "index" or "reindex" a plain and simple DTML Document. -- Wolfgang Strobl