Jim Fulton wrote: > Jean-Marc Orliaguet wrote: > >> Jim Fulton wrote: >> > ... > >>> Not quite, AFAICT. browser:page actually defines a page (e.g. >>> "foo.html") >>> relative to an object type. >> >> >> >> >> yes, but the object type is independent of the URL too, just like a >> theme page says nothing about what it will be applied to... > > > But browser:page *does* specify the object type. When I use browser:page > to define foo.html for IContact objects, I am causing contacts to have > that > page and not impacting any non-contact objects.
ok, if you mean that a page in cpsskins is not concerned about what object it will be associated with, then that's true. however the association will have to be done in some way, otherwise only the default page will always be displayed. So the difference is that cpsskins separates the declaration of the page from the context in which the page will be used. but the page will still have to be associated with some IContact, or with some part of the site, or with anything that can be associated with it otherwise it will never get a chance to be displayed. > >> >> >> it's not implemented yet in the Zope3 version (the only thing there is >> currently effective is the default page), I'd like this feature to be >> pluggable like the ISkin way of choosing a skin. >> >> in the zope2 version there are 5 or 6 ways of setting the page as >> described in: >> http://www.medic.chalmers.se/~jmo/CPS/CPSSkins-Book.pdf >> >> under the chapter: >> "USING SEVERAL THEMES INSIDE THE SAME PORTAL" >> >> in any case, there is no hardcoded link between pages and the content of >> the site. > > > I'm sorry, I still don't understand. > > Lets say I have a content object, say a poll. Now, I want that > poll to have a number of pages: > > - index.html > > This page displays the poll question and collects input. > If the user has already taken the poll, it indicates as much > and initializes the input to their previous answer. If they > submit input, it overrides their old input with their new input. > > - report.html shows poll results > > - edit.html allows the poll question to be edited. > > Now, How would I create these pages with CPSSkins? > it would not be concerned with index.html / report.html / edit.html AT ALL. 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 screens. cf http://svn.nuxeo.org/trac/pub/file/z3lab/cpsskins/trunk/portlets/macroslot/__init__.py the portlet renders the current view that gets inserted it into the theme at the location of the portlet. cpsskins does not do form rendering, document editing, or such things that are already done with page templates. the rendering of such pages is delegated to the application for instance. > Do I define each of these pages in a theme? > you don't, you only put a single portlet in the middle of the theme page that will render them, as a main macro-slot would do. > Or, perhaps, the theme pages are only used to provide a > a master page with a space for rendering individual page > content. Are theme pages used like page macros in Zope 3 > or like Zope2's standard_template? > > Jim 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. /JM _______________________________________________ Zope3-dev mailing list Zope3firstname.lastname@example.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com