[Zope3-dev] [DRAFT] local portlets and perspectives

Jim Fulton jim at zope.com
Fri Aug 26 15:46:05 EDT 2005


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.

> 
>>>it is more like a browser page than a site's page in any case.. i.e. a
>>>page that you see in your browser, the same "page" as in "PageMaker", a
>>>canvas, a template, etc..
>>
>>
>>I don't understand this.  By "browser page", do you mean it is like
>>a page as defined by the zcml browser:page directive? Or like a
>>page that is displayed in a browser?
>>
> 
> I mean, in the sense that the page applies to a whole class of things,
> not to a particular individual instanciated object in the site.
> 
> 
>>>>I think this is a critival point.  When I visit a URL on a section,
>>>>say:
>>>>
>>>> .../mysection/foo.html
>>>>
>>>>what determines which theme page is used?
>>>>
>>>
>>>
>>>there is a negociation, a default theme page to fall back to, but you
>>>can specify the page to use in many ways; through a URL parameter,
>>>?page=frontpage, through a cookie, through a session variable, by adding
>>>a subscriber to IBeforeTraverse and set the page to a "calendar" page if
>>>you enter a part of the site that has to doing with calendaring
>>>application...
>>
>>
>>Does the page ever depend on the thing being traversed?  Is there
>>a point where you'd say:
>>
>>  "when traversing an IBar with the name foo.html, use the theme page
>>   named 'splat'"?
>>
> 
> it would be the application's responsibility to override the default
> page to use, as it is done with the default skin. I think that
> schoolbell calendar application does that when the user enters a
> calendar application site.
> 
> it is very much like skin negociation, there is a page used by default,
> but it can be changed on-the-fly.
> 
> 
>>I'm having a hard time understanding the relationship between
>>objects, URLs and theme pages.
>>
>>Jim
>>
> 
> 
> 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?

Do I define each of these pages in a theme?

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

-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org


More information about the Zope3-dev mailing list