[Zope] aquisition problems with subitem in pyhton product

Toby Dickenson tdickenson@geminidataloggers.com
Fri, 27 Apr 2001 15:01:11 +0100


On Fri, 27 Apr 2001 14:43:22 +0200, zope-mailinglist
<zope-mailinglist@mopa.at> wrote:

>hello
>
>i've two python products which subclasses Folder.Folder
>
>One is called "Site"
>The other "Topic"
>
>there is a index_html attribute in the Site Product
>
>code:
>index_html =3D (DTMLFile('dtml/representation/site_index_html', =
globals()))
>
>now i put a Topic product into a Site product
>the Topic product itself has no index_html
>
>if i now request the url
>/theSite/theTopic/index_html
>
>the index_html shows up, but with the attributes of the Site object
>(like <dtml-var absolute_url> =3D=3D /theSite)
>so its the same as:
>/theSite/index_html
>
>it appears that i've got the same problem with other methods

Thats the correct and expected behavior for DTMLFile (assuming there
is no index_html in Topic). DTMLFile binds to containment before
context.

You could use HTMLFile instead (which only binds to context), but
beware that there are serious security issues. Check the Collector for
details.



Toby Dickenson
tdickenson@geminidataloggers.com