[Zope] acquisition question
Dieter Maurer
dieter@handshake.de
Tue, 27 Aug 2002 22:23:52 +0200
3205 5361 1215 9784 writes:
> i have a folder with a property no_price
>
> in that folder i call 'list' , a dtml method defined in the root
> folder
>
> that 'list' method calls sql.getOptions(), sql folder is in root dir
> too, with getOptions ZSQL method in it.
>
> this works fine... then i want to loop over the results from
> getOptions, like this <dtml-in "sql.getOptions()"> ... this works
> too...
>
> but when i am inside <dtml-in> block i cannot access the no_price
> property of the folder from which i am calling everything...
>
> if i list propertyItems, it shows the sql folder's properties...
>
> how can i get the porperty of the context folder?
Z SQL Method result rows are in the acquisition context of the
Z SQL Method (and therefore the folder containing it).
Inside the "dtml-in", a result row is on top of the DTML namespace.
This explains what you see.
You can work around this in the following way:
<dtml-let client=this>
<dtml-in ...>
<dtml-with client>
...
Dieter