Hi Carsten,

z3c.macro lets you define macros in a template, look them up via the
component registry with 'use-macro="macro: macroname"'. Then one can
override the macro with an adapter. The downside is that it's an additional
dependency and concept.
Nevertheless I think we should support some common needs with the default
templates. Adding many optional attributes to the form can get unclear
fast, but it's a far more direct way to influence the default templates
than adding more views, adapters and interfaces.

z3c.macro sounds interesting, but I think it'd be a big mistake to add a dependency on it now. We already have a lot of competing ways of doing this kind of customisation, and I'm not quite convinced z3c.macro is "right" or very sensible. It may turn out to be a winner, but given that plone.z3clayout is trying to be a pretty simple, fundamental component, I think betting on an esoteric customisation mechanism like this would be wrong. I'm pretty sure the CMF guys would agree given their stance to a Grok dependency as well.

My gut feel is that the default template for *Plone* will never be changed, and for everything else will always be customised. It's just not possible or sensible to predict the layout needs of other systems.

I'd thus prefer an approach where Plone's layout was provided via an adapter in plone.app.z3cform that provided the default (without making all forms have to depend on plone.app.z3cform to be functional!), in the same way formlib uses a named template to look up the default layout.

I used plone.theme (not in the current project) but was not aware that it's
not inherited by Plone's default skin. Sometimes I get stuck in the
component registry that I capitulate and look for another way :-(.

plone.theme just picks a theme; it's up to you to provide a marker interface that behaves in the right way. I normally just subclass Plone's default marker.

Cheers,
Martin


--
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book


_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to