|
1 | 1 | --- |
2 | 2 | myst: |
3 | 3 | html_meta: |
4 | | - "description": "" |
5 | | - "property=og:description": "" |
6 | | - "property=og:title": "" |
7 | | - "keywords": "" |
| 4 | + "description": "How to write your own behaviors for content types in Plone" |
| 5 | + "property=og:description": "How to write your own behaviors for content types in Plone" |
| 6 | + "property=og:title": "How to write your own behaviors for content types in Plone" |
| 7 | + "keywords": "Plone, behaviors, content types, introduction" |
8 | 8 | --- |
9 | 9 |
|
10 | 10 | # Introduction |
11 | 11 |
|
12 | | -**About this manual** |
13 | | - |
14 | 12 | This manual should teach you everything you need to know to write your own behaviors, but not how to integrate them into another framework. |
15 | 13 |
|
16 | | -*Behaviors* are re-usable bundles of functionality that can be enabled or disabled on a per-content type basis. |
| 14 | +Behaviors are reusable bundles of functionality that can be enabled or disabled on a per-content type basis. |
17 | 15 | Examples might include: |
18 | 16 |
|
19 | | -- A set of form fields (on standard add and edit forms), |
20 | | -- Enabling particular event handler, |
21 | | -- Enabling one or more views, viewlets or other UI components, |
22 | | -- Anything else which may be expressed in code via an adapter and/or marker interface. |
| 17 | +- A set of form fields (on standard add and edit forms) |
| 18 | +- Enabling particular event handler |
| 19 | +- Enabling one or more views, viewlets, or other UI components |
| 20 | +- Anything else which may be expressed in code via an adapter or marker interface. |
23 | 21 |
|
24 | 22 | You would typically not write a behavior as a one-off. |
25 | 23 | Behaviors are normally used when: |
26 | 24 |
|
27 | | -- You want to share fields and functionality across multiple types easily. |
28 | | - Behaviors allow you to write a schema and associated components (e.g. adapters, event handlers, views, viwelets) once and re-use them easily. |
29 | | -- A more experienced developer is making functionality available for re-use by less experienced integrators. |
30 | | - For example, a behavior can be packaged up and release as an add-on product. |
31 | | - Integrators can then install that product and use the behavior in their own types, either in code or through-the-web. |
| 25 | +- You want to share fields and functionality across multiple types easily. |
| 26 | + Behaviors allow you to write a schema and associated components—including adapters, event handlers, views, and viewlets—once and reuse them. |
| 27 | +- A more experienced developer makes functionality available for reuse by less experienced integrators. |
| 28 | + For example, a behavior can be packaged up and released as an add-on product. |
| 29 | + Integrators can then install that product, and use the behavior in their own types, either in code or through-the-web. |
32 | 30 |
|
33 | 31 | This manual is aimed at developers who want to write new behaviors. |
34 | 32 | This is a slightly more advanced topic than the writing of custom content types. |
35 | | -It assumes you are familiar with buildout, know how to create a custom package, understand interfaces and have a basic understanding of Zope’s component architecture. |
| 33 | +It assumes you are familiar with buildout, know how to create a custom package, understand interfaces, and have a basic understanding of Zope's component architecture. |
36 | 34 |
|
37 | 35 | Behaviors are not tied to Dexterity, but Dexterity provides behavior support for its types via the *behaviors* FTI property. |
38 | | -In fact, if you’ve used Dexterity before, you’ve probably used some behaviors. |
39 | | -Take a look at the [Dexterity Developer Manual] for more information about how to enable behaviors on a type and for a list of standard behaviors. |
40 | | - |
41 | | -To learn more about how behaviors in detail are implemented, see the [plone.behavior] package. |
| 36 | +In fact, if you've used Dexterity before, you've probably used some behaviors. |
| 37 | +Take a look at the {doc}`Dexterity Developer Manual <../index>` for more information about how to enable behaviors on a type, and for a list of standard behaviors. |
42 | 38 |
|
43 | | -[dexterity developer manual]: ../index.html |
44 | | -[plone.behavior]: http://pypi.python.org/pypi/plone.behavior |
| 39 | +To learn more about how behaviors are implemented in detail, see the [`plone.behavior`](https://pypi.org/project/plone.behavior/) package. |
0 commit comments