Jim Fulton wrote:
> Jean-Marc Orliaguet wrote:
>> a page has a "template" like a Zope Page Template, that would correspond
>> to the idea of layout.
> Sure, but It still seems that a "theme page" fills the same role as a
> template, in that it is meant to be used for many different page.
> Let me put this another way. When you define a theme page, you aren't
> saying anything about URLs.
exactly, the page <-> URL associating is done later on during page
rendering. There could be a page <-> view association too, or a page <->
hour of the day association,..
>> it's as unfortunate as a name as the <browser:page /> directive that is
>> associated to a browser view, and a page template. But the idea is
>> the same.
> Not quite, AFAICT. browser:page actually defines a page (e.g.
> 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...
>> 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,
>>> 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
> 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.
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
under the chapter:
"USING SEVERAL THEMES INSIDE THE SAME PORTAL"
in any case, there is no hardcoded link between pages and the content of
Zope3-dev mailing list