[Zope] How do I get the size of an item ?
Dimitris Andrakakis
dandraka_info@yahoo.com
Sat, 13 Jan 2001 01:13:36 +0200
Daniel wrote:
> You don't need the dtml-var inside another dtml-var i.e once you are in
> dtml you are in it. try something like this
>
> <dtml-with files>
> > <dtml-var "_.get_size(_['path[11:]'])">
> > </dtml-with>
Your advice was truly enlightning ! It didn't work exactly like this,
but this one did exactly as shown (remeber path is like
"06-01-2001/file.pdf"):
<dtml-with files>
<dtml-with "_[path[:10]]"> <--- this gets me into the "06-01-2001" dir
<dtml-with "_[path[11:]]"> <--- this gives me the variable space for
file.pdf
<dtml-var size>
</dtml-with>
</dtml-with>
</dtml-with>
I'll write a HOW-TO for this in my page, I think it's worth it. Thanks
for your help all of your guys !
Dimitris
http://atlas.central.ntua.gr:8000