Skip to content

Commit 2135a23

Browse files
committed
Tidy up schemas.md
1 parent cbe4115 commit 2135a23

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

docs/backend/schemas.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ Note this won't have behavior fields added to it at this stage, only the fields
221221

222222
## Using schema directives
223223

224-
With `plone.autoform` and `plone.supermodel` we can use directives to add information to the schema fields.
224+
With `plone.autoform` and `plone.supermodel`, we can use directives to add information to the schema fields.
225225

226226

227227
### Omit fields
@@ -269,13 +269,13 @@ In supermodel XML, this can be specified as:
269269
</field>
270270
```
271271

272-
`form:omitted` may be either a single boolean value, or a space-separated list of form_interface:boolean pairs.
272+
`form:omitted` may be either a single boolean value, or a space-separated list of `<form_interface>:<boolean>` pairs.
273273

274274

275275
### Reorder fields
276276

277277
A field's position in the form can be influenced using the `order_before` and `order_after` directives.
278-
In this example, the `not_last` field is placed before the `summary` field even though it is defined afterward:
278+
In this example, the `not_last` field is placed before the `summary` field, even though it is defined afterward:
279279

280280
```{code-block} python
281281
:emphasize-lines: 12
@@ -298,10 +298,10 @@ class IMySchema(model.Schema):
298298
)
299299
```
300300

301-
The value passed to the directive may be either `*` (indicating before or after all fields) or the name of another field.
302-
Use `.fieldname` to refer to field in the current schema or a base schema.
303-
Prefix with the schema name (e.g. `IDublinCore.title`) to refer to a field in another schema.
304-
Use an unprefixed name to refer to a field in the current or the default schema for the form.
301+
The value passed to the directive may be either `*`, indicating before or after all fields, or the name of another field.
302+
Use `<.fieldname>` to refer to the field in the current schema or a base schema.
303+
Prefix with the schema name, such as `IDublinCore.title`, to refer to a field in another schema.
304+
Use an unprefixed name to refer to a field in either the current or default schema for the form.
305305

306306
In supermodel XML, the directives are called `form:before` and `form:after`.
307307
For example:
@@ -323,17 +323,17 @@ Fields can be grouped into fieldsets, which will be rendered within an HTML `<fi
323323
In this example the `footer` and `dummy` fields are placed within the `extra` fieldset:
324324

325325
```{code-block} python
326-
:emphasize-lines: 6,7,8,9
326+
:emphasize-lines: 6-9
327327
:linenos:
328328
329329
from plone.supermodel import model
330330
from plone.autoform import directives as form
331331
332332
class IMySchema(model.Schema):
333333
334-
model.fieldset('extra',
334+
model.fieldset("extra",
335335
label=u"Extra info",
336-
fields=['footer', 'dummy']
336+
fields=["footer", "dummy"]
337337
)
338338
339339
footer = schema.Text(

0 commit comments

Comments
 (0)