[Zope-CMF] Differences in CMF Expression contexts (was: Caching
policy manager binding inconsistency)
Jens Vagelpohl
jens at dataflake.org
Mon Mar 14 08:19:53 EST 2005
I've done a quick survey of expression contexts used for TAL
expressions in CMF CVS-HEAD/1.6. There are five places [1] that build
these contexts or act as such.
There are differences in naming for the current user, the containing
folder, the content object, and associated URL strings pointing to the
content object. DCWorkFlow sticks out in this group because it has a
zope-ish naming convention rather than a CMF-ish schema, probably
because it [was|is] designed to be usable outside of the CMF, so I will
exclude it here. That leaves me with the following big difference:
- the content object:
- CachingPolicyManager: "content"
- CMFCore.Expression: "object" _and_ "here"
- CMFCore.utils: "object"
- CMFCore.ActionInformation: "content"
Suggestion: Standardize on either "object" or "content" in all of them.
This implies that URL strings that become part of the expression
context and point to the object in question get named accordingly
("object_url"/"content_url"). This standardization would include
documentation updates and, where possible, noting the available
expression context members on the form that is used to input the TAL
expression.
Question: Who would like to see standardization, and from those, what
name should be chosen?
jens
[1]
- CMFCore.CachePolicyManager.createCPContext
- CMFCore.Expression.createExprContext
- CMFCore.utils.getActionContext (marked as deprecated)
- DCWorkflow.Expression.createExprContext
- class CMFCore.ActionInformation.oai
More information about the Zope-CMF
mailing list