Global defines

2 messages Options
Embed this post
Permalink
Malthe Borch-2

Global defines

Reply Threaded More More options
Print post
Permalink
As it happens, Chameleon 1.0.x is incompatible with the Plone 3.x global
defines.

The reason is that the ``globalize`` method is called not from the
main_template.pt, but from global_defines.pt (such that the globals only
make it to this template scope).

Because of a technicality, the symbol to look for is ``rcontext`` and
not ``econtext``. An easy fix is to call the ``globalize`` method from
the main_template.pt, but we can expect many people to have customized
this template.

The less intrusive fix seems to be the following (also attached):

http://pastie.org/643768

It's not pretty, but perhaps it's acceptable.

\malthe

Index: global_defines.pt
===================================================================
--- global_defines.pt (revision 30209)
+++ global_defines.pt (working copy)
@@ -9,5 +9,6 @@
       tal:define="
         global plone_view context/@@plone;
         global view nocall:view | nocall:plone_view;
+        econtext rcontext | econtext;
         foo plone_view/globalize;
         " />

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Malthe Borch-2

Re: Global defines

Reply Threaded More More options
Print post
Permalink
On 10/6/09 4:36 PM, Malthe Borch wrote:
> The less intrusive fix seems to be the following (also attached):
>
> http://pastie.org/643768

Committed to 3.3 branch in r30243.

\malthe


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers