UNKNOWN
Project description
collective.easytemplate is a Plone add-on targetted for the end users who need automatic text snippets in their Kupu content. collective.easytemplate allows safe template tags inside Kupu editable text or any user editable HTML. This enables automatic content generation inside user editable HTML pages.
Product homepage Change history **********
Changelog
1.0 (xxxx-xx-xx)
Created recipe with ZopeSkel [Mikko Ohtamaa].
Detailed Documentation
Introduction
collective.easytemplate is targetted for the end users who need automatic text snippets in their Kupu content. collective.easytemplate allows safe template tags inside Kupu editable text or any user editable HTML. This enables automatic content generation inside HTML pages.
Motivation
Plone lacks out of the box support to custom tags for content editors to play with.
Use cases
The orignal use case was help maintaining the vast number of cross-reference link lists on course modules pages.
Possible other use cases are
Folder list snippets on a page
Dynamic images
Generated tables
Example
You write in Kupu:
Hello user! Please select one course from below: $folder_list("courses")
will result to the output:
Hello user!
Please select one course from below:
Status
The current version (0.1) is still in development and has few issues.
Zope security is not respected. You must trust your content editors, since Cheetah bypasses security and malicious Python sawy user could seriously harm your site. For this reason, you can suggest any working Zope-aware non-XML-based template language for me.
Cheetah namespace traverse does not work. E.g. $myobject.myvar raises NotFound exception even if it is not present.
Installation
Add to your buildout:
eggs = collective.easytemplate zcml = collective.easytemplate
Run quick installer for Easy Template product.
Usage
Use content type “Templated Document” whenever you want to use template tags in Kupu content.
If you get errors in your template code, you can toggle on “Catch errors” on Template schemata and view detailed exception tracebacks in Zope log.
Backend
Cheetah template engine is used. Plone’s native TAL does not work too well with escaped HTML.
Tag debugging tips
If Cheetah template compilation fails you might have made copy-paste errors
HTML formatted text, having HTML tags inside Cheetah expression
Hard line breaked text, having hard line breaks inside Cheetah expression
So please recycle all your template tag copy-pastes through Notepad or similar application.
Sponsorship
The development of this product was sponsored by London School of Marketing.
Contributors
Mikko Ohtamaa, Author
Download
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for collective.easytemplate-0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | deb0a619dd8d58b4b6fa86a693bc59e3389c9d6bcb1d8ae91467065056957079 |
|
MD5 | e8a012ee01d3a56c6484dc306c5089dc |
|
BLAKE2b-256 | ef16c54ae42a65568a03353dd7d708ecc5fc3828167b6e918133fe283fb71cbb |
Hashes for collective.easytemplate-0.1-py2.5.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | b321fa3048c1052a337a6f5b506cea8fe7ba4e69440ec18668efeed3556c6a54 |
|
MD5 | c6313e285ae09f5237a4a42970cd8643 |
|
BLAKE2b-256 | 74929ef239b499f8a3c6400550a1309f169c4fa4225a5a115215749ce4f915de |