Jean-Marc Orliaguet wrote:
Jim Fulton wrote:
it would not be concerned with index.html / report.html / edit.html
you would just place a "Main Content Portlet" in the middle of the page
and let the application underneath take care of rendering the poll
the portlet renders the current view that gets inserted it into the
theme at the location of the portlet.
Let me try to rephrase this: The portlet renders the current view.
It renders it into the location of the portlet within the theme-defined
Where does it get the current view? Is it normally passed in? By whom?
from the original theme renderer's template.pt (associated to the
cpsskins skin). It gets propagated all the way from the view to the
portlet, through the page, cells, etc. as a keyword parameter that the
renderer can use at any time.
the orginal context is also propagated.
<body tal:content="structure python:pageview(
There are some details here I don't understand, but I'll
skip those for now....
yes, inside the theme you leave a "window area" to display views from
the application you're designing a theme for. You can use the zwiki
application under cpsskins already, although cpsskins knows nothing
about wiki pages.
OK, I get it. So this this is all about defining what Tres likes to
call the "O wrap". The stuff that is drawn around the application
generated markuo and that, through CSS styles, images, etc, has
some influence on how the markup is displayed.
yes, CPSSkins was created from the beginning as a simple replacement of
main_template before all the theme / page distinctions were introduced.
the breakthrough difference in the zope3 version is that the main
content area (inside the O wrap) can be rendered directly in python.
So, what if I wanted to use portlets within one of my application
views? Does CPSSkins let me do that too?
yes, these would be application-specific portlets, as the ones used in a
calendar application for instance showing a monthly agenda. The portlet
gets access to the current view object, to the current page location
(renamed from 'context_obj' to 'location'). So as soon as you can
produce some data from that you have a portlet that can be put inside a
I don't understand this. Does the application page use a theme page
to render it's output, which then gets inserted into the o-wrap produced
by another theme page? Or does it use a different o-wrap theme-page
which includes the portlets it wants to be displayed?
Or, put another way, which of the following strategies are used:
We render the master page (o wrap), which calls the view. The view then
finds another theme page that has portlets it wants. The view renders
this theme page and returns the result to the calling master page, which then
renders the whole page.
When we display the view, we select a different master page than the usual
one. This special master page has portlets that the view wants to be
or none of the above? :)
Jim Fulton mailto:[EMAIL PROTECTED] Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
Zope3-dev mailing list