Dimitris Andrakakis writes:
 > ....
 > What I need is, from a dtml method in /news, to get 
 > the size of an object (a file, say /news/files/file01.pdf) 
 > in /news/files.
You know Zope's integrated online help?

There you would find that files have a method "getSize"
that returns their size.

In the upcoming Zope bock (-> zope.org), you could read
that "dtml-with" can be used to access objects in "foreign"
contexts:

        <dtml-with "news.files">
          <dtml-var "_.getitem('file01.pdf').getSize()>
        </dtml-with>

or

        <dtml-var "_.getattr(news.files,'file01.pdf').getSize()">

will do.


Dieter

_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to