Define multiple pages without repeating all of the parameters.
The pages directive allows multiple page views to be defined
without repeating the for
, permission
, class
, layer
,
allowed_attributes
, and allowed_interface
attributes.
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_
-
GlobalObject
(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'.
Subdirective to IPagesDirective
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.
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.
template
-
Path
(default =
None
)
Refers to a file containing a page template (should end in
extension .pt
or .html
).
title
-
MessageID
(default =
None
)
This attribute must be supplied if a menu attribute is supplied.
* = required