[Zope-CMF] File_view page -- making download appear only when there's a file

Kevin Carlson khcarlso@bellsouth.net
Fri, 5 Jul 2002 17:45:22 -0400


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="&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