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

Jim Fulton jim at zope.com
Fri Aug 26 14:16:04 EDT 2005


Jean-Marc Orliaguet wrote:
> Jim Fulton wrote:
> 
> 
>>>Hi Jim, here are the concepts defined:
>>
>>
>>It's too bad these aren't defined in a more perminent and referenceable
>>location.
>>
>>
>>>- A *theme* is a visual unity, when you go from cnn.com to bbc.co.uk you
>>>see that sites are using different themes. The includes, colors, styles,
>>>icons, etc.
>>
>>>- Inside a same theme there are *pages*, pages use the styles defined in
>>>the theme, but the layout may be different (3 columns -> 2 columns) from
>>>one page to another. The rationale is that when you create a new page,
>>>you want to be able to reuse the same styles.
>>> 
>>>   typically there is: the front page, the section page, the login
>>>page ...
>>
>>
>>A page, as defined here, seems to be a template, as opposed to a page
>>with
>>a particular URL. I take it all section index.html pages use the same
>>theme pages.  The use of the term "page" here seems unfortunate.  If a
>>section
>>has a page for searching, would that also use the section page from
>>the theme?
>>Or would that use some other theme page?
>>
> 
> 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.

> 
> 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. "foo.html")
relative to an object type.

> 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 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'"?

I'm having a hard time understanding the relationship between
objects, URLs and theme pages.

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