[Zope-CMF] File_view page -- making download appear only when there's a file
Yoni Hammer Kossoy
yonih@mandelschool.org.il
Sun, 7 Jul 2002 10:38:54 +0200
Thanks to Kevin and Dieter for your suggestions...working code is
below...
<dtml-with "essay1">
<dtml-if expr=3D"getSize() > 0">
<a href=3D"&dtml-absolute_url;">View Essay 1</a>
</dtml-if>
</dtml-with>
Best,
Yoni
-----Original Message-----
From: Kevin Carlson [mailto:khcarlso@bellsouth.net]=20
Sent: Friday, July 05, 2002 11:45 PM
To: Yoni Hammer Kossoy
Cc: zope-cmf group
Subject: RE: [Zope-CMF] File_view page -- making download appear only
when there's a file
You can check the "size" property -- it will be non-zero if a file is
attached. Assuming of course, the file has a non-zero length...
Kevin
-----Original Message-----
From: zope-cmf-admin@zope.org [mailto:zope-cmf-admin@zope.org]On Behalf
Of Yoni Hammer Kossoy
Sent: Thursday, July 04, 2002 6:59 AM
To: zope-cmf@zope.org
Subject: [Zope-CMF] File_view page -- making download appear only when
there's a file
Hi all,
I'm trying to figure out how to customize the file_view page so that the
link to download a file only appears in the body of the page if a file
has actually been attached (a reasonable change, no?).
My newbie efforts of:
<dtml-with essay1>
<dtml-if file>
<a href=3D"&dtml-absolute_url;"><b>View Essay 1</b></a>
</dtml-if>
</dtml-with>
...results in an excessive recursion error.
Any assistance with doing this the correct way would be most
appreciated.
Thanks in advance,
Yoni Hammer-Kossoy
_______________________________________________
Zope-CMF maillist - Zope-CMF@zope.org
http://lists.zope.org/mailman/listinfo/zope-cmf
See http://www.zope.org/Products/PTK/Tracker for bug reports and feature
requests