Hi, I've just had a quick flick through the archives but can't find the answer to my question. I'm a newbie to TAL and TALES, though I've dabbled in Zope before. Now I'm starting to play with page templates, as they seem more elegant than DTML. However, I have one question. Is it possible for TALES expressions to make use of acquisition? As a trivial example, say I have a script called getRoot in the root folder that returns the URL of where that script lives. Say also I have a folder off the root called MyFolder, which contains the following link: <a href="Link" tal:attributes="href container/getRoot">My Link Somewhere</a> Now, I would intuitively have expected Zope to look in the container for getRoot (ie. MyFolder), fail to find it, and look in the parent folder, then execute it there. However - this doesn't happen. And I can't find any mention of acquisition in the TAL docs. How do the two interoperate? Pointers to relevant comments/docs are appreciated? Many thanks, Dan
On Sun, Dec 15, 2002 at 07:45:19PM +0000, Dan Fairs wrote:
DTML. However, I have one question. Is it possible for TALES expressions to make use of acquisition?
Yes.
As a trivial example, say I have a script called getRoot in the root folder that returns the URL of where that script lives. Say also I have a folder off the root called MyFolder, which contains the following link:
<a href="Link" tal:attributes="href container/getRoot">My Link Somewhere</a>
Now, I would intuitively have expected Zope to look in the container for getRoot (ie. MyFolder), fail to find it, and look in the parent folder, then execute it there. However - this doesn't happen.
"It doesn't work" is rarely adequate information for anyone to diagnose a problem... what you describe *does* work when everything is correctly in place. Spelling error perhaps? -- Paul Winkler http://www.slinkp.com "Welcome to Muppet Labs, where the future is made - today!"
"It doesn't work" is rarely adequate information for anyone to diagnose
Apologies for the lack of detail - I was just intending it as a general background to my previous error. As to my previous example - yes, you were right, spelling error :) Funny how you only notice typos when you ask the world about them... Thanks for your time. Cheers, Dan
participants (2)
-
Dan Fairs -
Paul Winkler