[Zope-CMF] is this tiny patch to CMFCore/Expression.py okay?
Paul Winkler
pw_lists at slinkp.com
Sun Nov 28 23:37:46 EST 2004
On Mon, Nov 29, 2004 at 03:52:48AM +0000, Chris Withers wrote:
> Index: Expression.py
> ===================================================================
> --- Expression.py (revision 1038)
> +++ Expression.py (working copy)
> @@ -105,6 +105,7 @@
> 'modules': SecureModuleImporter,
> 'member': member,
> 'here': object,
> + 'context': object.aq_parent,
> }
> return getEngine().getContext(data)
>
> It means you can get access to the acquisition context of the current
> object in a nicely bound name, handy for doing things like:
>
> string:{context/absolute_url}/some_script_that_twiddles_folder_properties
>
> ...in action expressions ;-)
>
> I'd like to apply it to the 1.5 branch and CVS head unless anyone has
> any objections?
-1 for being inconsistent with Page Templates. In Page Templates,
"here" and "context" are bound to the same thing.
Maybe you could bind it to something like "parent" instead?
--
Paul Winkler
http://www.slinkp.com
More information about the Zope-CMF
mailing list