Supplies an Archetypes field useful for editing and storing Zope Page Templates
This product provides two Archetype fields that store and render templates. There’s the DTMLField for DTML templates and the ZPTField for ZPT templates.
Install as usual in your Products directory or as an egg.
Add this line to your custom Archetype to import the fields:
from Products.TemplateFields import DTMLField, ZPTField
In your schema, add DTMLFields and ZPTFields like this:
BaseSchema + Schema(( ... DTMLField('oneField'), ZPTField('anotherField'), ... ))
Thanks to Sidnei da Silva for the TALESField product, which served as the base for this.
Visit http://plone.org/products/scriptablefields for documentation, bug-reports, etc.
- 2005-2007, BlueDynamics Alliance, Klein & Partner KEG, Austria
TemplateFields may be installed as either an egg or as a traditional Zope product.
Just add archetypes.TemplateFields to the “eggs” list for the buildout or zope2instance parts:
- eggs =
- … Products.TemplateFields …
Just use the copy of easy_setup for the Python that you’re using to run Zope.
Traditional Zope Product Installation
Copy or symbolically link the Products.TemplateFields/Products/TemplateFields to be Products/TemplateFields in your Zope instance’s Products directory.
- ZopePageTemplate’s write method decodes the template text; make sure that we encode with UTF-8 when returning the text in getRaw. [davisagli]
- 1.2.3 release was somehow botched.
- Switch to Zope 3 interfaces; we’re now Plone 4 compatible. [smcmahon]
- Fix typo in exception handler. [wichert]
- Fix type in error handling. [ivo]
- Add a configurable option to swallow errors generated while rendering a template field. These errors were problematic since they break catalog indexing of the object, resulting in site errors. [wichert]
- Make sure to use a page template with acquisition context when validating fields. Without this context variables such as context and here were not available. [wichert]
- Cleanup REST syntax in the documentation and add a changelog. [wichert]
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size Products.TemplateFields-1.2.5.zip (21.2 kB)||File type Source||Python version None||Upload date||Hashes View hashes|
Hashes for Products.TemplateFields-1.2.5.zip