<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><span idspanfor="frame" mlb_idspanflag="true" style="border: 1px solid black; padding: 0px 3px; z-index: 500; font-size: xx-small; font-family: sans-serif; position: absolute; top: 0pt; left: 0pt;">73</span><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><span style="border: 1px solid black; padding: 0px 3px; font-size: xx-small; font-family: sans-serif;"></span>----- Original Message ----<br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">From: Maciej Wisniowski <maciej.wisniowski@coig.katowice.pl><br><div><br>> I'm not sure whether it is what you're looking for but<br>> it may be one of simplest solutions that you may<br>> change if you need to. As
Andreas said before,<br>> ask a specific question :)<br><br>> 1. Log into ZMI and create a folder called 'Myfiles'<br><br>> 2. upload your files via FTP or something into 'Myfiles' folder<br>> and as you said before they should appear as 'File' objects<br><br>> 3. Create a file 'files2zpt.py' in the 'Extensions/' folder of your Zope<br>> instance (filesystem, not ZMI) and fill it with this code:<br><br>> #----------------<br>> from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate<br><br>> def files2zpt(self):<br>> for fname, fobj in self.objectItems('File'):<br>> self._setObject(fname+'_zpt', ZopePageTemplate(fname+'_zpt', <br>> str(fobj.data)))<br>> return 'ok'<br>> #-----------------<br><br>> 4. Go back to ZMI and to 'Myfiles/' folder and create
'External method' <br>> there<br>> by simply filling all fields in the add form as 'files2zpt'<br><br>> 5. Click on your new External method files2zpt in ZMI and 'Test' it :)<br><br>> Thats all<br><br>Thank you so much! Worked like a charm ;)<br>Nancy<br></div></div></div></div></div><br></body></html>