[Zope-CMF] Re: [Plone-developers] Re: Retaining ease of
customisation
Jean-Marc Orliaguet
jmo at ita.chalmers.se
Thu Nov 24 09:50:07 EST 2005
Laurence Rowe wrote:
> Jean-Marc,
>
> Just trying to understand your scheme here, but taking Martin's
> example of a current zpt macro, how would I replace the macro with a
> view and retain the ability to customise it TTW?
>
> From my limited understanding of your cps skins package it seems that
> it is perfect for site managers to customise layout (what goes where)
> but not the visual design of a site, or have I miusunderstood?
>
> Regards,
>
> Laurence
>
Hi Laurence,
Sorry I missed your reply, there have been many cross-posted messages :-)
My point --- and probably this would require some slight changes in
Plone's template machinery -- is to make a separation between the view
and the resources used by the view. In zope3 you can create and register
a view that calls a ZPT, for instance (taken from Benji's excellent
http://www.benjiyork.com/quick_start/ )
template = pagetemplate.ViewPageTemplateFile('hello.pt')
def __call__(self):
return self.template()
the 'hello.pt' template is in that case considered as a resource used by
the view. You could instead refer to a template object stored in the
ZODB and call it accordingly. The same goes with all types of resources,
i.e. images, styles, css, portlets, ....
so probably, you don't need to customize the entire view, but only the
part of the view that actually should be customized.
I don't know if this would work with macros though...
the code of the resource manager (that makes it possible to customize
filesystem resources) is at:
http://svn.z3lab.org/trac/z3lab/file/cpsskins/branches/jmo-perspectives/setup/resources.py
it is based on using utilities (local / global) to register resource no
matter where they come from (TTW or TTFS)
PS: the cpsskins package does (or is meant) to replace page templates
for site design from A to Z.
ZPTs are then used as resources (to create portlets) or to have custom
forms, etc.
regards /JM
More information about the Zope-CMF
mailing list