[Zope-CMF] Re: .objects files and stripping of extensions - minor change requested

Tres Seaver tseaver at zope.com
Tue Apr 20 16:35:30 EDT 2004


Alexander Limi wrote:
> 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.

The only issue I can think of here is forward compatibility:  I don't 
believe many people make use of the '.objects' mapping, but any who do 
will see their sites break.

+1 if nobody screams within a week.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver at zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com




More information about the Zope-CMF mailing list