Martijn Faassen writes:
We've been experiencing some odd interactions between the ZCatalog and acquisition. Inside the <dtml-in catalog ..> tags things seem to go screwy. It's picking up the properties in the root folder instead of in the subfolder (the context), where the <dtml-in catalog ..> is used. Why would this happen? I could reproduce this in Zope 2.1.6.
I can understand that the result is not what one wants, but when I understand aquisition correct, it is in accordance with the documentation. You probably get "catalog" by aquisition. The catalogs aquisition context is inherited to the "Result" object and then to the "Record" objects representing the lookup results. As I understand, a feature request to such a record first follows the aquisition chain of catalog and only then the aquicition chain that led to catalog.
Another odd thing that happens is that dtml-let variables appeared wiped empty inside the dtml-in:
<dtml-let foo="'bar'"> <dtml-in catalog ..> .... <dtml-var foo> .... </dtml-in> </dtml-let>
The <dtml-var foo> will display nothing. 'foo' *does* exist, but it just appears to be empty. I could not reproduce this in my Zope installation.
Do your Record objects (results of "dtml-in") have a "foo" field (maybe inherited)? Dieter