[Zope-CMF] .objects files and stripping of extensions - minor
change requested
Alexander Limi
limi at plone.org
Mon Apr 19 12:15:42 EDT 2004
Hi,
I was recently pointed to a nice undocumented feature of the CMF that
gives you the ability to map a file to a certain meta_type, overriding the
FS template defaults.
For those of you not familiar with the method, you can generate a file
'.objects' in an FSDirectoryView and have entries like this inside of it:
plone.css:DTML Method
This would map the file 'plone.css' to be a DTML method, as opposed to
being a File object, which is the default.
When I discovered this, I thought - great, now we don't have to do ugly
double extensions like .css.dtml anymore - I can just map the file in the
.objects file, and it'll work.
The problem is, though - the method actually strips the extensions from
the file, circumventing what I see as the most useful use case for this
method. So my file 'plone.css' actually ends up as a DTML Method - but
with the name 'plone', and thus we are back to the same problem as with
the other method - requiring double extensions.
Could we change this to *not* strip the extensions instead? This would be
extremely useful, and allow us to map any future file type to the correct
type. Another very relevant example are XSLT files, which currently
require a mapping like .xlst.pt or similar to keep their proper extensions
inside the system.
--
__________________________________________________________________
Alexander Limi · Interaction Architect · Plone Solutions
Development · Training · Support · http://www.plonesolutions.com
__________________________________________________________________
Plone Co-Founder · http://plone.org · Connecting Content
More information about the Zope-CMF
mailing list