[Zope] string into var/ filesize

Ethan Fremen mindlace@majordomo.net
Thu, 25 Nov 1999 19:15:55 +0000


Zopistas,

I've got a download preview page for a pdf file.  The pdf file is in the
same directory and called pdf.  In a method attached to the preview
document, I want to find out the filesize of the associated pdf file.

Something like this:

<a href="<dtml-var absolute_url>.pdf">Download</a> XYZkb 

except XYZkb should be replaced with <dtml-var "pdffile.filesize()"> or
something like that.

But it has to generate the name for pdffile from the preview page id.

So something like:
<dtml-let "pdffile=id()+ 'pdf'">
<dtml-var "_[pdffile].filesize()">

This doesn't work, but I'm not sure what to do.  I'm still totally
confused about _.

--
Ethan "mindlace" Fremen
you cannot abdicate responsibility
for your ideology.