vendor/Five/1.2b-r20590

view doc/directives.txt @ 0:3673ed425f80

Vendor import of Five 1.2b+ (r20590)
author fguillaume
date Fri, 02 Dec 2005 20:25:42 +0000
parents
children
line source
1 =================================
2 ZCML Directives supported by Five
3 =================================
5 Five tries to use the Zope 3 ZCML directives where possible, though
6 does sometimes subset the possible attributes. It also introduces a
7 few directives of its own under the ``five`` namespace.
9 Directives are listed per namespace, in alphabetic order.
11 zope ``http://namespaces.zope.org/zope``
12 ========================================
14 adapter
15 -------
17 Hook an adapter factory to an interface.
19 content
20 -------
22 Declare interface and permissions on content object. Declares Zope 2
23 permissions.
25 permission
26 ----------
28 Way to make Zope 2 permissions available to Five, ``title`` is
29 permission name.
31 redefinePermission
32 ------------------
34 Redefine a permission in included ZCML as another one.
36 service
37 -------
39 Declare a global service
41 serviceType
42 -----------
44 Declare a type of service.
46 skin
47 ----
49 Declare a skin, consisting of layers.
51 utility
52 -------
54 Declare a global utility.
56 interface
57 ---------
59 Register an interface in ZCML.
61 factory
62 -------
64 Register an object factory.
66 modulealias
67 -----------
69 Provide a module under an alias name, e.g. for persistent backward
70 compatability.
72 hook
73 ----
75 Install a hook on a hookable object.
77 browser ``http://namespaces.zope.org/browser``
78 ==============================================
80 page
81 ----
83 Declare a page view for an interface. Permission is a Zope 2
84 permission.
86 pages
87 -----
89 Declare multiple page views for an interface. Permissions are Zope 2
90 permissions.
92 defaultView
93 -----------
95 Declare the name of the view that should be used for the default when viewing
96 the object; i.e. when the object is traversed to without a view.
98 defaultSkin
99 -----------
101 Declare the default skin used.
103 editform
104 --------
106 Create an edit form based on a schema.
108 addform
109 --------
111 Create an add form based on a schema.
113 layer
114 -----
116 Declare a layer.
118 menu
119 ----
121 Declare a menu
123 menuItem, menuItems
124 -------------------
126 Declare menuItems
128 five ``http://namespaces.zope.org/five``
129 ========================================
131 implements
132 ----------
134 Make a class declare it implements an interface.
136 loadProducts
137 ------------
139 Loads ZCML in all Zope 2 products. First processes all ``meta.zcml``
140 files, then processes all ``configure.zcml`` files.
142 loadProductsOverrides
143 ---------------------
145 Loads overriding ZCML in all products (``overrides.zcml``).
147 traversable
148 -----------
150 Make a Zope 2 content class traversable in the Zope 3 manner using
151 Five. This is used to attached views, resources and other things to
152 Zope 2 objects.
154 defaultViewable
155 ---------------
157 Make a Zope 2 content class use a Zope 3 default view when looking at
158 it without any paths appended to it. This works then instead of
159 ``index_html`` in Zope 2.
161 sizable
162 -------
164 Retrieve size information for a Zope 2 content class via a Zope 3
165 style ``ISized`` adapter.
167 containerEvents
168 ---------------
170 Make events be sent for Zope 2 container objects, instead of calling old
171 methods like ``manage_afterAdd``. These old methods will still be called
172 for classes specified in a ``deprecatedManageAddDelete`` directive.
174 deprecatedManageAddDelete
175 -------------------------
177 Specify a class that needs its old deprecated methods like
178 ``manage_afterAdd``, ``manage_beforeDelete`` and ``manage_afterClone``
179 to be called. Modern classes should use event subscribers instead.
181 pagesFromDirectory
182 ------------------
184 Loads all files with .pt extension in a directory as pages.
186 registerClass
187 -------------
189 Registers Five content with Zope 2.
191 localsite
192 ---------
194 Turns a class into an implementation of ``IPossibleSite`` so that its
195 instances can be serve as local sites. Unless otherwise specified, a
196 default implementation's methods will be used to make the class comply
197 with the ``IPossibleSite`` interface.