[Zope] container and context for folderish objects
Milos Prudek
prudek at bvx.cz
Tue May 10 15:53:54 EDT 2005
I created a very simple folderish product. Everything works fine. But I
was surprised that "context" and "container" seem to behave
differently for folderish object than for normal Folder.
Here's the problem: my product's instance "a" contains a DTML Document
"doc" and some photos "img1", "img2". A simple ZPT "lst" queries object ids:
<p><li tal:repeat="item python:here.objectIds()" tal:content="item"></p>
<p><li tal:repeat="item python:container.objectIds()"
tal:content="item"></p>
I need to call this ZPT as follows:
/a/doc/lst
and I expect to get a list of objects contained in "a". The problem is
that lst does not provide that. The first line shows nothing, and the
second line shows content of the parent Folder! I would have expected
that "container" is the "a", the folderish object. Why does it not work?
I \know that I can get my list by calling /a/lst, but unfortunately I
cannot do that.
--
Milos Prudek
More information about the Zope
mailing list