[ZPT] Content/Presentation Separation

Florent Guillaume fg@nuxeo.com
Thu, 25 Apr 2002 15:10:11 +0000 (UTC)


> > I think that it should work exactly the way around :
> > URL traversal should arrive on a Python script which access data and 
> > prepares it before passing it to a Page template.
> 
> That's the same conclusion I arrived to after a few months of usage of Page 
> Templates.

I do it the dual way; my page templates start with something like:

 <tal:block define="global data here/displayform_getdata" />

and displayform_getdata is a python script that computes all relevant
data for the display of this page template, and returns it as a dict.

The big advantage over your method is that displayform_getdata can be
called from several different page templates, so I can factor out code
easily.

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg@nuxeo.com