[Zope] dtml document or dtml method?

Jaroslav Lukesh lsh@wo.cz
Mon, 30 Sep 2002 19:14:59 +0200


Hi,

I have trouble with linking dynamically generated images. So now I totally
dont understand differences between DTML documents and methods:

[cite]
The most important of these differences is that while a 
DTML Document is an object with properties of its own, 
a DTML Method is an object which inherits properties 
from its container.
[/cite]

So I have specified as DTML document(!) page segment which is called from
nested segments that are DTML methods. This DTML document builds image menu
from TinyTablePlus. But images are downloaded at each subfolder again and
again because it have that URL:

http://localhost:8080/www/www.k-net.cz/cs2/info/mapa/images/buttonky/M2.gif
	instead of
http://localhost:8080/www/www.k-net.cz/cs2/images/buttonky/M2.gif

Button's URL is constructed from that code in DTML Document (simplified):

<dtml-in buttonky_L_table>
        <a href="<dtml-var link>"><img 
        src="images/buttonky/<dtml-var letter>.gif"></a><br>
</dtml-in>

"letter" and "link" are columns in TinyTabel called buttonky_L_table

I think that construction of right buttons URL have somewhat with
acquisition, but do not have any idea how to do that. Maybe some
complicated construction with PARENT, but I think that is not right way.

Many thanks,

J. Lukesh