[z3-five] Z2/Z3 skin integration, or, views and portal_skins.
Lennart Regebro
regebro at nuxeo.com
Tue Nov 9 12:11:37 MET 2004
Martijn Faassen wrote:
> I think we need to have some discussions on the page template issue
> and what the best approach to use is here. There are a number of
> routes to take and various consequences. Let's spin off a thread about
> this; what do people want and what problems do people see?
OK, here is the thread. :-)
First, what do I want:
Well, we have a big CMS written on CMF, using pprtal_skins, of course.
Now we want to make a transitional start towards Zope3, with Five. But
then, we need to be able to integrate Five components with CMF, and the
biggest obstacle there is the skin integration. It is not possible to
call the template macros in portal_skins from the Zope3 view templates,
bacsue the portal_skins objects are Zope2 templates, and the view
templates are Zope3 templates, and they are not compatible on that level.
This means that it's currently impossible to integrate the Five objects
into a CMF site, which is what I want.
Tres Seaver wrote:
> I had a glimmer of an idea about this, but unfortunately was not where
> I could stop and write it down / check it out, so it now eludes me.
> I *think* it had something to do with adding a "view bridge"
> component, which would wrap around the "skin templates" and "skin
> scripts", faking them out by providing an appropriate context.
Well, it's not only the context that is the problem, I think. The main
problem for me is that you can't use macros. Zope3 ZPTs doesn't
understand the information given to them by Zope2 ZPTs.
I tried to overcome that by making Five use Zope2 PageTemplateFiles
instead of Zope3 PageTemplateFiles. That gave the unexpected side-effect
of the page template having no useful context. Everything, context,
parent, here, you name it, pointed to the PageTemplateFile, instead of
anywhere useful. If we go that way, then context wrapping may be a
solution. I have no idea what side-effects that would have...
I also looked into to making some kind of wrapper function to actually
parse the Zope2 template and and create a finished HTML page, wrapped in
a macro, and give this to a Zope3 pagetemplate, but that was quickly
obvious that it would be very complex and slow, and not a good idea.
So, I'm stuck. :)
More information about the z3-five
mailing list