While switching a client project over to Chameleon I ran into a couple TAL variable scope issues and I also ran into the Missing.MissingValue issue. For the variable scope issues, I've uploaded patches for test coverage that exposes the bugs to LP.
The first issue I ran into was with tal:define variable assignment when the assignment refers an existing value for the variable in the second "else" ("|") clause. This prevents using the TAL pattern where you're doing metal:use-macro on a macro that checks for existing values of variables with a default. This allows you to override the value in the template that uses the macro. The example I ran into this was in the Archetypes "base_*" templates where you can override certain "*_macro" macros, such as "body_macro", that are used in composing the rendered page: https://bugs.launchpad.net/chameleon.core/+bug/664176 The second issue was in using the tal:repeat variables when doing metal:use-macro where the macro references the repeat variable. In this case, the repeat variable is empty: https://bugs.launchpad.net/chameleon.core/+bug/664761 Finally, I ran into an already reported bug where the Chameleon machinery tries to do an i18n translation on the Missing.MissingValue used by Products.ZCatalog when there's no index or metadata value for the item being indexed: https://bugs.launchpad.net/z3c.pt/+bug/649343 I've worked around these issues for now but thought I might try and spur some solutions. Unfortunately, I know nothing about the internals of any template engine so my contributions are limited to providing failing test cases that expose the bugs. Thanks! Ross _______________________________________________ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev