Can anyone here explain clearly what is the difference between DTML
Methods and DTML Documents regarding acquisition?
Well, in simple cases I think I understand it. When I call a Method
through the web, it use dynamic (based on current URL) acquisition path. A
Document uses static (based on its position in ZODB) path.
But what if I want to look a bit deeper? What are acquision paths for a
Method called from a Document, not directly from the web? I beleive when a
Document called from a Method it always uses static acquisition path. But
what about a Method called from a Document? It seems my Methods stopped
using dynamic paths and use static paths, provided by its callee. Right?
Let's see a running demo. The site http://phd.russ.ru/pcgi/TEST/
constructed as follows:
/TEST - folder
index_html - standard DTML Document with default content
standard_html_header - DTML Method
standard_html_footer - DTML Method
2 - folder, empty
Both folders /TEST and /TEST/2 have a property "foobar". In /TEST its value
is "First test!", in /TEST/2 - "This is SECOND test." standard_html_header
show the property with <dtml-var foobar>.
When I call standard_html_header directly through the web, it acquires
foobar using dynamic acquisition path:
show foobar from root (/TEST)
show foobar from /TEST/2
But then I call standard_html_header from DTML Document index_html:
show foobar from root (/TEST); exactly as I expected, no problem
WOW! It show foobar again from root, not from /TEST/2!
standard_html_header acquires using static path provided by index_html!
Is it normal and intended behaviour? If it is, how can I "solve" my
problem? (I want to acquire different properties in standard_html_header,
but call standard_html_header from different DTML Documents).
Oleg Broytmann http://www.zope.org/Members/phd/ [EMAIL PROTECTED]
Programmers don't die, they just GOSUB without RETURN.
Zope maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -