[Zope-dev] Weird acquisition behavior of Page Templates

Paul Winkler pw_lists@slinkp.com
Sun, 4 May 2003 18:40:36 -0400


Here's a puzzler...

So we all know how you can use context acquisition by visiting various
URLs in the browser, right?  E.g. if let's say we have a folder
in the zope root, called my_folder. Let's say it contains an image,
a dtml method, and a page template called respectively my_image,
my_dtml, and my_pt.

Now we all know that if you browse to /my_folder/my_image/my_dtml,
you'll see my_dtml rendered. my_image just gets added to its acquisition
path. 

Likewise if you visit /my_folder/my_dtml/my_template,
you'll see my_template rendered, with my_dtml at the end of
the aq_chain.

And if you visit /my_folder/my_template/my_dtml, you'll
see my_dtml with my_template on the aq_chain.

except the last one is not true. :-P

As far as i can tell, if you put a page template anywhere in the URL,
it gets rendered no matter what else comes after it in the URL.
/my_folder/my_template/foo/bar/baz...  no matter what, you get
my_template rendered.

what the hell is up with that?  Bug?

try it yourself. zope 2.6.1.

-- 

Paul Winkler
home:  http://www.slinkp.com
"Muppet Labs, where the future is made - today!"