You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/backend/behaviors.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ Other behaviors are implemented as add-on products, which can be installed and c
30
30
Once a behavior has been installed, it can be applied to any content type by selecting it in the {guilabel}`Content Types` control panel.
31
31
This allows items of this content type to gain the additional functionality provided by the behavior.
32
32
33
-
A key feature of behaviors is that they allow encapsulating functionality so that it can be reused for multiple content types without needing to reimplement it.
33
+
A key feature of behaviors is that they allow encapsulating functionality so that it can be reused for multiple content types without needing to implement it again.
34
34
Overall, behaviors are an important part of the Plone content management system and allow for powerful customization and extensibility of content objects.
35
35
36
36
@@ -40,7 +40,7 @@ Overall, behaviors are an important part of the Plone content management system
40
40
41
41
To view a complete list of built-in behaviors, browse to {guilabel}`Content Types` control panel, then click {guilabel}`Page` (or any other content type), then {guilabel}`Behaviors`.
42
42
43
-
| short name | Title |Desription|
43
+
| short name | Title |Description|
44
44
|---|---|---|
45
45
|`plone.allowdiscussion`| Allow discussion | Allow discussion on this item |
46
46
|`plone.basic`| Basic metadata | Adds title and description fields. |
@@ -72,11 +72,11 @@ To view a complete list of built-in behaviors, browse to {guilabel}`Content Type
72
72
|`volto.preview_image`| Preview Image | Preview image for listings |
73
73
|`volto.preview_image_link`| Preview Image Link | Preview image for listings based on links |
74
74
|`plone.relateditems`| Related items | Adds the ability to assign related items |
|`plone.shortname`| Short name | Gives the ability to rename an item from its edit form. |
77
77
|`plone.tableofcontents`| Table of contents | Adds a table of contents |
78
-
| `plone.thumb_icon` | Thumbs and icon handling | Options to suppress thumbs and/or icons and to override thumb size in listings, tables etc.
79
-
|`plone.versioning`| Versioning | Versioning support with CMFEditions |
78
+
|`plone.thumb_icon`| Thumbs and icon handling | Options to suppress thumbs or icons and to override thumb size in listings, tables, and other user interface elements |
79
+
|`plone.versioning`| Versioning | Versioning support with `CMFEditions`|
80
80
81
81
```{todo}
82
82
For each behavior in the table above, one may view the source code of the checkbox (its `name` attribute) to view its Short Name.
@@ -307,7 +307,7 @@ You do not *need* to know this, but it may help if you run into problems.
307
307
```
308
308
309
309
In Plone, behaviors can be globally enabled on content types at runtime.
310
-
With add-ons, behaviors can be enabled even on a single content object or for a whole subtree in the content hierarchy.
310
+
With add-ons, behaviors can be enabled even on a single content object or for a whole subdirectory tree in the content hierarchy.
Copy file name to clipboardExpand all lines: docs/backend/fields.md
+40-40Lines changed: 40 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,27 +30,27 @@ Refer to the table below to see what properties a particular interface implies.
30
30
31
31
| Interface | Property | Type | Description |
32
32
| - | - | - | - |
33
-
|`IField`|`title`| int | The title of the field. Used in the widget. |
34
-
||`description`| unicode | A description for the field. Used in the widget. |
35
-
||`required`| bool | Whether or not the field is required. Used for form validation. The default is `True`. |
36
-
||`readonly`| bool | Whether or not the field is read only. Default is `False`. |
33
+
|`IField`|`title`|`int`| The title of the field. Used in the widget. |
34
+
||`description`|`unicode`| A description for the field. Used in the widget. |
35
+
||`required`|`bool`| Whether or not the field is required. Used for form validation. The default is `True`. |
36
+
||`readonly`|`bool`| Whether or not the field is read only. Default is `False`. |
37
37
||`default`|| The default value for the field. Used in forms and sometimes as a fallback value. Must be a valid value for the field if set. The default is `None`.|
38
38
||`defaultFactory`|| The default factory method for the field. Used in forms and sometimes as a fallback value. This is a name of a method which returns a dynamic default value.|
39
-
||`missing_value`|| A value that represents "this field is not set". Used by form validation. Defaults to `None`. For lists and tuples, it is sometimes useful to set this to an empty list or tuple. |
40
-
|`IMinMaxLen`|`min_length`| int | The minimum required length or minimum number of elements. Used for `string`, sequence, mapping, or `set` fields. Default is `0`. |
41
-
||`max_length `| int | The maximum allowed length or maximum number of elements. Used for `string`, sequence, mapping, or `set` fields. Default is `None` (no check). |
39
+
||`missing_value`|| A value that represents "this field is not set." Used by form validation. Defaults to `None`. For lists and tuples, it is sometimes useful to set this to an empty list or tuple. |
40
+
|`IMinMaxLen`|`min_length`|`int`| The minimum required length or minimum number of elements. Used for `string`, sequence, mapping, or `set` fields. Default is `0`. |
41
+
||`max_length `|`int`| The maximum allowed length or maximum number of elements. Used for `string`, sequence, mapping, or `set` fields. Default is `None` (no check). |
42
42
|`IMinMax`|`min`|| The minimum allowed value. Must be a valid value for the field, for example, an `int` field should be an integer. Default is `None` (no check). |
43
43
||`max`|| The maximum allowed value. Must be a valid value for the field, for example an `int` field should be an integer. Default is `None` (no check). |
44
44
|`ICollection`|`value_type`|| Another `Field` instance that describes the allowable values in a list, tuple, or other collection. Must be set for any collection field. One common usage is to set this to a `Choice` to model a multi-selection field with a {doc}`vocabulary </backend/vocabularies>`. |
45
-
||`unique`| bool | Whether or not values in the collection must be unique. Usually not set directly. Use a `Set` or `Frozenset` to guarantee uniqueness in an efficient way. |
45
+
||`unique`|`bool`| Whether or not values in the collection must be unique. Usually not set directly. Use a `Set` or `Frozenset` to guarantee uniqueness in an efficient way. |
46
46
|`IDict`|`key_type`|| Another `Field` instance that describes the allowable keys in a dictionary. Similar to the `value_type` of a collection. Must be a `Set`. |
47
47
||`value_type`|| Another `Field` instance that describes the allowable values in a dictionary. Similar to the `value_type` of a collection. Must be a `Set`. |
48
48
|`IObject`|`schema`|`Interface`| An interface that must be provided by any object stored in this field. |
49
-
|`IRichText`|`default_mime_type`| str | Default MIME type for the input text of a rich text field. Defaults to `text/html`. |
50
-
||`output_mime_type`| str | Default output MIME type for the transformed value of a rich text field. Defaults to `text/x-html-safe`. There must be a transformation chain in the `portal_transforms` tool that can transform from the input value to the output value for the `output` property of the `RichValue` object to contain a value. |
51
-
||`allowed_mime_types`| tuple | A list of allowed input MIME types. The default is `None`, in which case the site-wide settings from the {guilabel}`Markup` control panel will be used. |
49
+
|`IRichText`|`default_mime_type`|`str`| Default MIME type for the input text of a rich text field. Defaults to `text/html`. |
50
+
||`output_mime_type`|`str`| Default output MIME type for the transformed value of a rich text field. Defaults to `text/x-html-safe`. There must be a transformation chain in the `portal_transforms` tool that can transform from the input value to the output value for the `output` property of the `RichValue` object to contain a value. |
51
+
||`allowed_mime_types`|`tuple`| A list of allowed input MIME types. The default is `None`, in which case the site-wide settings from the {guilabel}`Markup` control panel will be used. |
52
52
53
-
See [IField interface](https://zopeschema.readthedocs.io/en/latest/api.html#zope.schema.interfaces.IField) and [field implementation](https://zopeschema.readthedocs.io/en/latest/api.html#field-implementations) in `zope.schema` documentation for details.
53
+
See [`IField` interface](https://zopeschema.readthedocs.io/en/latest/api.html#zope.schema.interfaces.IField) and [`field` implementation](https://zopeschema.readthedocs.io/en/latest/api.html#field-implementations) in `zope.schema` documentation for details.
54
54
55
55
56
56
## Field types
@@ -65,31 +65,31 @@ The following tables describe the most commonly used field types, grouped by the
65
65
| Name | Type | Description | Properties |
66
66
| - | - | - | - |
67
67
|`Choice`| n/a | Used to model selection from a vocabulary, which must be supplied. Often used as the `value_type` of a selection field. The value type is the value of the terms in the vocabulary. | See {doc}`/backend/vocabularies`. |
68
-
|`Bytes`| str | Used for binary data. |`IField`, `IMinMaxLen`|
69
-
|`ASCII`| str | ASCII text (multi-line). |`IField`, `IMinMaxLen`|
70
-
|`BytesLine`| str | A single line of binary data, in other words a `Bytes` with new lines disallowed. |`IField`, `IMinMaxLen`|
71
-
|`ASCIILine`| str | A single line of ASCII text. |`IField`, `IMinMaxLen`|
72
-
|`Text`| unicode | Unicode text (multi-line). Often used with a WYSIWYG widget, although the default is a text area. |`IField`, `IMinMaxLen`|
73
-
|`TextLine`| unicode | A single line of Unicode text. |`IField`, `IMinMaxLen`|
74
-
|`Bool`| bool |`True` or `False`. |`IField`|
75
-
|`Int`| int, long | An integer number. Both ints and longs are allowed. |`IField`, `IMinMax`|
76
-
|`Float`| float | A floating point number. |`IField`, `IMinMax`|
77
-
|`Tuple`| tuple | A tuple (non-mutable). |`IField`, `ICollection`, `IMinMaxLen`|
78
-
|`List`| list | A list. |`IField`, `ICollection`, `IMinMaxLen`|
79
-
|`Set`| set | A set. |`IField`, `ICollection`, `IMinMaxLen`|
80
-
|`Frozenset`| frozenset | A frozenset (non-mutable). |`IField`, `ICollection`, `IMinMaxLen`|
81
-
|`Password`| unicode | Stores a simple string, but implies a password widget. |`IField`, `IMinMaxLen`|
82
-
|`Dict`| dict | Stores a dictionary. Both `key_type` and `value_type` must be set to fields. |`IField`, `IMinMaxLen`, `IDict`|
83
-
|`Datetime`| datetime | Stores a Python `datetime` (not a Zope 2 `DateTime`). |`IField`, `IMinMax`|
84
-
|`Date`| date | Stores a Python `date`. |`IField`, `IMinMax`|
85
-
|`Timedelta`| timedelta | Stores a Python `timedelta`. |`IField`, `IMinMax`|
86
-
|`SourceText`| unicode | A textfield intended to store source text, such as HTML or Python code. |`IField`, `IMinMaxLen`|
87
-
|`Object`|N/A| Stores a Python object that conforms to the interface given as the `schema`. There is no standard widget for this. |`IField`, `IObject`|
88
-
|`URI`| str | A URI (URL) string. |`IField`, `MinMaxLen`|
89
-
|`Id`| str | A unique identifier, either a URI or a dotted name. |`IField`, `IMinMaxLen`|
90
-
|`DottedName`| str | A dotted name string. |`IField`, `IMinMaxLen`|
91
-
|`InterfaceField`| Interface | A Zope interface. |`IField`|
92
-
|`Decimal`| Decimal | Stores a Python `Decimal`. Requires version 3.4 or later of [`zope.schema`](https://pypi.org/project/zope.schema/). Not available by default in Zope 2.10. |`IField`, `IMinMax`|
68
+
|`Bytes`|`str`| Used for binary data. |`IField`, `IMinMaxLen`|
69
+
|`ASCII`|`str`| ASCII text (multi-line). |`IField`, `IMinMaxLen`|
70
+
|`BytesLine`|`str`| A single line of binary data, in other words a `Bytes` with new lines disallowed. |`IField`, `IMinMaxLen`|
71
+
|`ASCIILine`|`str`| A single line of ASCII text. |`IField`, `IMinMaxLen`|
72
+
|`Text`|`unicode`| Unicode text (multi-line). Often used with a WYSIWYG widget, although the default is a text area. |`IField`, `IMinMaxLen`|
73
+
|`TextLine`|`unicode`| A single line of Unicode text. |`IField`, `IMinMaxLen`|
74
+
|`Bool`|`bool`|`True` or `False`. |`IField`|
75
+
|`Int`|`int`, `long`| An integer number. Both `int`s and `long`s are allowed. |`IField`, `IMinMax`|
76
+
|`Float`|`float`| A floating point number. |`IField`, `IMinMax`|
77
+
|`Tuple`|`tuple`| A tuple (non-mutable). |`IField`, `ICollection`, `IMinMaxLen`|
78
+
|`List`|`list`| A list. |`IField`, `ICollection`, `IMinMaxLen`|
79
+
|`Set`|`set`| A set. |`IField`, `ICollection`, `IMinMaxLen`|
80
+
|`Frozenset`|`frozenset`| A `frozenset` (non-mutable). |`IField`, `ICollection`, `IMinMaxLen`|
81
+
|`Password`|`unicode`| Stores a simple string, but implies a password widget. |`IField`, `IMinMaxLen`|
82
+
|`Dict`|`dict`| Stores a dictionary. Both `key_type` and `value_type` must be set to fields. |`IField`, `IMinMaxLen`, `IDict`|
83
+
|`Datetime`|`datetime`| Stores a Python `datetime` (not a Zope 2 `DateTime`). |`IField`, `IMinMax`|
84
+
|`Date`|`date`| Stores a Python `date`. |`IField`, `IMinMax`|
85
+
|`Timedelta`|`timedelta`| Stores a Python `timedelta`. |`IField`, `IMinMax`|
86
+
|`SourceText`|`unicode`| A text field intended to store source text, such as HTML or Python code. |`IField`, `IMinMaxLen`|
87
+
|`Object`|n/a| Stores a Python object that conforms to the interface given as the `schema`. There is no standard widget for this. |`IField`, `IObject`|
88
+
|`URI`|`str`| A URI (URL) string. |`IField`, `MinMaxLen`|
89
+
|`Id`|`str`| A unique identifier, either a URI or a dotted name. |`IField`, `IMinMaxLen`|
90
+
|`DottedName`|`str`| A dotted name string. |`IField`, `IMinMaxLen`|
91
+
|`InterfaceField`|`Interface`| A Zope interface. |`IField`|
92
+
|`Decimal`|`Decimal`| Stores a Python `Decimal`. Requires version 3.4 or later of [`zope.schema`](https://pypi.org/project/zope.schema/). Not available by default in Zope 2.10. |`IField`, `IMinMax`|
93
93
94
94
95
95
### Fields in `plone.namedfile.field`
@@ -141,14 +141,14 @@ See {ref}`backend-ploneschema-label` for more details.
141
141
142
142
(backend-fields-schema-autoform-label)=
143
143
144
-
### autoform (directives) schema ordering, filtering, and permissions
144
+
### `autoform` (directives) schema ordering, filtering, and permissions
145
145
146
146
147
147
(backend-fields-supermodel-label)=
148
148
149
-
## supermodel (xml)
149
+
## `supermodel` (XML)
150
150
151
151
152
152
(backend-fields-supermodel-autoform-label)=
153
153
154
-
### autoform (directives) supermodel ordering, filtering, and permissions
154
+
### `autoform` (directives) supermodel ordering, filtering, and permissions
Copy file name to clipboardExpand all lines: docs/backend/relations.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -168,7 +168,7 @@ So far we only used the vocabulary `plone.app.vocabularies.Catalog`, which retur
168
168
Alternatively you can use `CatalogSource` to specify a catalog query that only returns the values from the query.
169
169
170
170
You can pass to `CatalogSource` the same arguments you use for catalog queries.
171
-
This makes it very flexible for limiting relatable items by type, path, date, and so on.
171
+
This makes it very flexible for limiting relatable items by type, path, date, and other items.
172
172
173
173
Setting the mode of the widget to `search` makes it easier to select from the content that results from your catalog query instead of having to navigate through your content tree.
174
174
@@ -447,7 +447,7 @@ This returns the related items so that you will be able to render them any way y
447
447
448
448
## Inspecting relations
449
449
450
-
In Plone 6 Classic UI, you can inspect all relations and backrelations in your site using the control panel {guilabel}`Relations` at the browser path `/@@inspect-relations`.
450
+
In Plone 6 Classic UI, you can inspect all relations and back relations in your site using the control panel {guilabel}`Relations` at the browser path `/@@inspect-relations`.
451
451
452
452
```{figure} /_static/inspect-relations.png
453
453
:alt: The Relations controlpanel
@@ -467,7 +467,7 @@ In Plone 5 this is available through the add-on [collective.relationhelpers](htt
467
467
468
468
### Plone 6
469
469
470
-
Since Plone 6, `plone.api` has methods to create, read, and delete relations and backrelations.
470
+
Since Plone 6, `plone.api` has methods to create, read, and delete relations and back relations.
471
471
472
472
```{code-block} python
473
473
:linenos:
@@ -505,14 +505,14 @@ See the chapter {ref}`plone:chapter-relation` of the docs for `plone.api` for mo
505
505
506
506
### Plone 5.2 and older
507
507
508
-
In older Plone versions, you can use [collective.relationhelpers](https://pypi.org/project/collective.relationhelpers) to create and read relations and backrelations in a very similar way.
508
+
In older Plone versions, you can use [collective.relationhelpers](https://pypi.org/project/collective.relationhelpers) to create and read relations and back relations in a very similar way.
0 commit comments