[Zope] Dynamic hyperlink with parameter

2005-04-09 Thread srikanth
Hi,

  I am trying to execute something like:
   
 tr tal:repeat=recordset
td tal:replace=recordset/fnamea
href=eachrecordresult.html?fname='recordset/fname' First Name
/a/td
td tal:replace=recordset/lname Last Name /td
/tr


   Everything works fine but the hyperlink. What I want it to look in
the hyperlink is something like:
 eachrecordresult.html?fname='chris' 
 where eachrecord is separe ZPT which retrieves each persons
record and displays it.


But how it interprets it is (each looks the same):
   eachrecordresult.html?fname='recordset/fname'


  How can I solve this problem.

Thanks in advance.
Srikanth.


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Set MIME type using ZPT

2005-04-04 Thread srikanth
Hi,

  I am using an external method to load an Image from the harddrive. The
external method is as follows:

from email.MIMEImage import MIMEImage
##parameters=filename
def getDocument(filename):
  fname = '/mnt/'+filename;
input = open(fname,'r')
content = MIMEImage( input.read( ) )
input.close( )
return content


When I try to display the content in the webpage what I actually got is
all raw data of the file rather the image. 
So how can I convert the raw data to be dispalyed as image in the
webpage. I am using ZPT to display the web page (image). If its dtml I
could have used dtml-mime tag is there any equivalent to that in ZPT.

Any suggestion would be a gr8 help.

Ta.


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )