[Zope] File Extensions in FileSystemSite Product or FileSystemDirectoryView

Elena Schulz elena.schulz@gmx.net
Mon, 16 Jun 2003 11:53:26 +0200


Hi Dieter,

thanks a lot:
>   The various "FS*" modules contain registrations of the form:
>      registerFileExtension(extension, FSClass)

with adding registerFileExtension('zpt',Page Template) I could make
FileSystemSite to recognize .zpt as a Page Template too.
Shouldn't that be standart as 'zpt' is the standard Extension for ZPT's and
not 'pt' as implemented or am I wrong?

>   When you have a modern CMF version (1.3.1 or above),
>   then you can define a "keep_extension" property with
>   a true value to prevent the extension to be discarded
>   for this file.

but how to add a property to an object in the filesystem? FileSystemSite
doesn't allow additional properties.

Another question: when I utilize the ExternalFile Product it seems to aquire
the properties of the caller but FileSystemSite seems not to do so that as I
get different results calling the same file with the same code and
'myExternalFileInstance' & 'myFileSystemSiteInstance' being in the same
folder:

zpt = getattr(context, 'myExternalFileInstance')
print myExternalFileInstance[myZPTFile[:-len(ext)]](context,REQUEST) # here
I get the properties of callers acquiration path

extSite = getattr(context, 'myFileSystemSiteInstance')
print myFileSystemSiteInstance[myZPTFile](context,REQUEST) # here not

Does anybody know what's going wrong?

Thanks,

--Elena