[zope2-tracker] [Bug 377948] [NEW] Inconsistent access to macros of page templates

Patrick Gerken do3ccqrv at googlemail.com
Mon May 18 10:00:21 EDT 2009


Public bug reported:

If one acquires a page template from zodb which is actually stored in file system, one gets a class
Products.CMFCore.FSPageTemplate.FSPageTemplate.

One can access the macros defined in that page template with
obj.macros

The class looks like a plone class, but actually it inherits the macros
as a property from Products.PageTemplates/PageTemplate.py

If one acquires a page template that is defined as a browser:view via zcml, one can acquire macros via
obj.index.macros
or
obj['macros']

at least in 2.10 in trunk, one can acquire macros via
obj.index.macros, 
or if he knows the macro name, he can acquire the concrete macro via
obj['macro_name']

I have no idea who is wrong about all this, but it would be cool, if we
could agree that at least one implementation is wrong, so that third
party code needs only one way to get the macros. Currently there is no
single one way that will work with all implementations. Also, I think
that the way it works in trunk is wrong too.

** Affects: zope2
     Importance: Undecided
         Status: New

-- 
Inconsistent access to macros of page templates
https://bugs.launchpad.net/bugs/377948
You received this bug notification because you are a member of Zope 2
Developers, which is subscribed to Zope 2.


More information about the zope2-tracker mailing list