[Zope3-dev] difference between view and page
Garrett Smith
garrett@mojave-corp.com
Sun, 4 May 2003 11:12:16 -0500
I've read through the documentation in view.stx and page.stx, but I'm
not clear on their differences.
The issue never bothered me until I saw the following in
zope/app/browser/traversal.zcml:
<view
for=3D"*"=09
name=3D"absolute_url"
factory=3D".absoluteurl.AbsoluteURL"
type=3D"zope.publisher.interfaces.http.IHTTPPresentation"
permission=3D"zope.Public"
=20
allowed_interface=3D"zope.app.interfaces.browser.absoluteurl.IAbsoluteURL=
"
/>
<browser:page
for=3D"*"
name=3D"absolute_url"
class=3D".absoluteurl.AbsoluteURL"
permission=3D"zope.Public"
=20
allowed_interface=3D"zope.app.interfaces.browser.absoluteurl.IAbsoluteURL=
"
/>
Similar, but different :-)
Docs state that a view "defines a view that has subpages". Docs state
that a page "is used to create views that provide a single url or page".
Pages aren't strictly used for URLs as is illustrated by the use of
absolute_url for breadcrumbs -- the "page" merely provides methods that
are useful in page renderings.
And views aren't strictly used to define subpages, as is illustrated by
the view empty element above (no subpages).
-- Garrett