The view directive defines a view that has subpages.
The pages provided by the defined view are accessed by first traversing to the view name and then traversing to the page name.
permission
*
-
Permission
(default =
None
)
The permission needed to use the view.
allowed_attributes
-
Tokens
(default =
None
)
By default, 'permission' only applies to viewing the view and any possible sub views. By specifying 'allowed_attributes', you can make the permission also apply to the extra attributes on the view object.
allowed_interface
-
Tokens
(default =
None
)
By default, 'permission' only applies to viewing the view and any possible sub views. By specifying this attribute, you can make the permission also apply to everything described in the supplied interface.
Multiple interfaces can be provided, separated by whitespace.
class_
-
GlobalObject
(default =
None
)
A class that provides attributes used by the view.
for_
-
GlobalInterface
(default =
None
)
layer
-
LayerField
(default =
None
)
A skin is composed of layers. It is common to put skin specific views in a layer named after the skin. If the 'layer' attribute is not supplied, it defaults to 'default'.
menu
-
MenuField
(default =
None
)
Many views are included in menus. It's convenient to name
the menu in the page directive, rather than having to give a
separate menuItem directive. zmi_views
is the menu most often
used in the Zope management interface.
name
-
TextLine
(default =
u''
)
The name shows up in URLs/paths. For example foo
.
provides
-
GlobalInterface
(default =
<InterfaceClass zope.interface.Interface>
)
A view can provide an interface. This would be used for views that support other views.
title
-
MessageID
(default =
None
)
This attribute must be supplied if a menu attribute is supplied.
Subdirective to IViewDirective.
name
*
-
TextLine
(default =
None
)
The name shows up in URLs/paths. For example foo
or
foo.html
. This attribute is required unless you use the
subdirective page
to create sub views. If you do not have
sub pages, it is common to use an extension for the view name
such as .html
. If you do have sub pages and you want to
provide a view name, you shouldn't use extensions.
attribute
-
PythonIdentifier
(default =
None
)
This refers to the attribute (method) on the view that is implementing a specific sub page.
template
-
Path
(default =
None
)
Refers to a file containing a page template (should end in
extension .pt
or .html
).
Subdirective to IViewDirective.
name
*
-
TextLine
(default =
None
)
The named page will be used as the default if no name is specified explicitly in the path. If no defaultPage directive is supplied, the default page will be the first page listed.
* = required