On Feb 23, 2008, at 10:53 PM, Malthe Borch wrote:

The z3c.pt-package now provides a template class for plain text files like .css and .js---using the ${<python expression>}-syntax.

I'd like to integrate it with browser resources such that

 filename.css.<some extension for z3c.pt text templates>

would be sent through the template engine.

Now, the DirectoryResource-class defined in zope.app.publisher.browser.directoryresource provides a dictionary of resource factories for a number of standard file extensions.

Shouldn't this be pluggable using the component architecture? It would adapt to IResourceFactory.


+1. Some more details would need to be worked out. For example, to work for your use case, it would need to be involved in search, or the searching rules would need to be made more powerful, so, when looking for some file name, it is prepared to consider files that have the file name as a base and use some additional extension, as in your example. I would love to see someone work this out. A proposal would be appreciated.

I recently added a hack^H^H^H^Henhancement to zc.resourcelibrary to let you specify a custom directory resource factory to work around this limitation so I could have a dynamically generated js file.

Jim

--
Jim Fulton
Zope Corporation


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

Reply via email to