[Zope-dev] pseudo database records for the "in" tag?

julian@zereau.net julian@zereau.net
Tue, 09 Mar 1999 16:22:31 -0000 (GMT)


On 09-Mar-99 Jeffrey P Shell wrote:
>> From: julian@zereau.net I need to know how to structure dynamic tabular data
>> (returned from an external method) so that the "in" tag can handle it like
>> it
>> does the results of a SQL method and do automatic variable setting etc.
> 
> Just return a sequence of mapping objects (dictionaries) or instances.  One
> thing to note when looping over a sequence of mapping objects with the in
> tag, the parameter "mapping" must be set.

Okay, I've tried this, I still have problems.

I've made an external method (called "basket") - at the moment it is jury rigged
to always return the mapping [{'quantity': '5', 'pcode': 'abc'}]

using the "try it" tab on the method works fine and results in the text
string above being sent to the browser

calling <!--#var basket--> gives an error

calling <!--#in basket mapping--> gives an error

---
Julian Morrison
Programmer (Zereau Ltd)