[Zope] Acquisition Template

Mike Renfro renfro@tntech.edu
Tue, 25 Jun 2002 14:37:37 -0500


On Tue, Jun 25, 2002 at 03:24:31PM -0300, Marco Catunda wrote:

> 	1. tal:repeat="dirDoc here/objectValues"

'here' is like 'context' in a Python script. It's determined by the
calling location (i.e., the URL).

> 	2. tal:repeat="dirDoc python:container.objectValues('Folder')"

'container' is the actual folderish object that contains the code, in
this case, the folder that contains your template. The value of
container is invariant of your calling location, thus you have the
results that you noted: the second example *always* gives a list of
folders underneath the folder containing the template.

> How do I translate "here/objectValues" to the same code using python
> script? What's the code of python script could substitute "here"?

Should be 'context', I think. Also, according to peterbe's DTML->ZPT
translation page (www.zope.org/Members/peterbe/DTML2ZPT), it looks
like tal:repeat="dirDoc python:here.objectValues('Folder')" would give
a list of folders in the current context.

-- 
Mike Renfro  / R&D Engineer, Center for Manufacturing Research,
931 372-3601 / Tennessee Technological University -- renfro@tntech.edu