Pluggable template engine
I've refactored the ``pagetemplate`` module to realistically support plugging in an alternative implementation of the parser and interpreter. http://svn.zope.org/zope.pagetemplate/branches/engine-as-component/ Two new interfaces are added which serve as the plugging point see ``IPageTemplateEngine`` and ``IPageTemplateProgram`` in this module: http://svn.zope.org/zope.pagetemplate/branches/engine-as-component/src/zope/... I'd like to propose merging this into trunk. \malthe
What problem does this solve? Jim On Wed, Jul 20, 2011 at 11:24 AM, Malthe Borch <mborch@gmail.com> wrote:
I've refactored the ``pagetemplate`` module to realistically support plugging in an alternative implementation of the parser and interpreter.
http://svn.zope.org/zope.pagetemplate/branches/engine-as-component/
Two new interfaces are added which serve as the plugging point see ``IPageTemplateEngine`` and ``IPageTemplateProgram`` in this module:
http://svn.zope.org/zope.pagetemplate/branches/engine-as-component/src/zope/...
I'd like to propose merging this into trunk.
\malthe _______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
-- Jim Fulton http://www.linkedin.com/in/jimfulton
It makes it possible to use Chameleon with the stock template classes without monkey-patching the ``TALInterpreter`` class and ``_cook``. \malthe On 20 July 2011 17:43, Jim Fulton <jim@zope.com> wrote:
What problem does this solve?
Jim
On Wed, Jul 20, 2011 at 11:24 AM, Malthe Borch <mborch@gmail.com> wrote:
I've refactored the ``pagetemplate`` module to realistically support plugging in an alternative implementation of the parser and interpreter.
http://svn.zope.org/zope.pagetemplate/branches/engine-as-component/
Two new interfaces are added which serve as the plugging point see ``IPageTemplateEngine`` and ``IPageTemplateProgram`` in this module:
http://svn.zope.org/zope.pagetemplate/branches/engine-as-component/src/zope/...
I'd like to propose merging this into trunk.
\malthe _______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
-- Jim Fulton http://www.linkedin.com/in/jimfulton
Hello, On Wed, 20 Jul 2011 17:24:08 +0200 Malthe Borch <mborch@gmail.com> wrote:
I've refactored the ``pagetemplate`` module to realistically support plugging in an alternative implementation of the parser and interpreter.
http://svn.zope.org/zope.pagetemplate/branches/engine-as-component/
Two new interfaces are added which serve as the plugging point see ``IPageTemplateEngine`` and ``IPageTemplateProgram`` in this module:
http://svn.zope.org/zope.pagetemplate/branches/engine-as-component/src/zope/...
I'd like to propose merging this into trunk.
I think it is a great idea to make that pluggable. Regards, Sylvain, -- Sylvain Viollon -- Infrae t +31 10 243 7051 -- http://infrae.com Hoevestraat 10 3033GC Rotterdam -- The Netherlands
Hi Malthe, How often is the adaptation called? For example, suppose a Page Template had a tal:repeat that rendered a macro inside of it. If that tal:repeat looped 5 times, do we get 5 more adaptation calls, besides the call of the outermost Page Template? Just asking out of curiosity, I haven't looked at the code, other than the interface link you posted. Cheers, Leo On Wed, Jul 20, 2011 at 17:24, Malthe Borch <mborch@gmail.com> wrote:
I've refactored the ``pagetemplate`` module to realistically support plugging in an alternative implementation of the parser and interpreter.
http://svn.zope.org/zope.pagetemplate/branches/engine-as-component/
Two new interfaces are added which serve as the plugging point see ``IPageTemplateEngine`` and ``IPageTemplateProgram`` in this module:
http://svn.zope.org/zope.pagetemplate/branches/engine-as-component/src/zope/...
I'd like to propose merging this into trunk.
\malthe _______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
I will merge this branch if there are no objections. \malthe On 20 July 2011 17:24, Malthe Borch <mborch@gmail.com> wrote:
I've refactored the ``pagetemplate`` module to realistically support plugging in an alternative implementation of the parser and interpreter.
http://svn.zope.org/zope.pagetemplate/branches/engine-as-component/
Two new interfaces are added which serve as the plugging point see ``IPageTemplateEngine`` and ``IPageTemplateProgram`` in this module:
http://svn.zope.org/zope.pagetemplate/branches/engine-as-component/src/zope/...
I'd like to propose merging this into trunk.
\malthe
participants (5)
-
Hanno Schlichting -
Jim Fulton -
Leonardo Rochael Almeida -
Malthe Borch -
Sylvain Viollon