Skip to content

Commit 4c82a7a

Browse files
committed
Fix MyST and English syntax and grammar, adhere to style guide in creating-content-types.md
1 parent 0633048 commit 4c82a7a

File tree

1 file changed

+48
-45
lines changed

1 file changed

+48
-45
lines changed
Lines changed: 48 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
myst:
33
html_meta:
4-
"description": "Creating content types to manage tasks."
5-
"property=og:description": "Creating content ttypes to manage tasks."
6-
"property=og:title": "Creating content types"
4+
"description": "Creating content types to manage tasks in Plone."
5+
"property=og:description": "Creating content types to manage tasks in Plone."
6+
"property=og:title": "Creating content types to manage tasks in Plone."
77
"keywords": "Content Types, FTI, Dexterity, plonecli, bobtemplates.plone"
88
---
99

@@ -12,106 +12,109 @@ myst:
1212
When we attempt to solve a particular content management problem with Plone, we will often design new content types.
1313
For the purpose of this example, we'll build a simple set of types to manage tasks.
1414

15-
- A content type `Tasks` is used to hold all task objects and present a list of tasks to the user.
16-
This type is folderish (Container).
17-
- A content type `Task` with the information about the task.
18-
Fields include name, description, and status of the task.
19-
This type is non-folderish (Item).
15+
- We will use a content type `Tasks` to hold all task objects and present a list of tasks to the user.
16+
This type is folderish (`Container`).
17+
- We will use a content type `Task` with the information about the task.
18+
Fields include name, description, and status of the task.
19+
This type is non-folderish (`Item`).
2020

2121
## Creating a Plone package
2222

23-
A content type is typically created inside a Plone package. We will use the {term}`plonecli` to create a Plone package and our content types.
23+
We typically create a content type inside a Plone package.
24+
We will use the {term}`plonecli` to create a Plone package and our content types.
2425

25-
```sh
26-
$ plonecli create addon collective.tasks
26+
```shell
27+
plonecli create addon collective.tasks
2728
cd collective.tasks
2829
```
2930

3031
## Adding content types
3132

3233
Let's add a content type called `Tasks`:
3334

34-
```sh
35-
$ plonecli add content_type
35+
```shell
36+
plonecli add content_type
3637
```
3738

38-
fill in the name `Tasks` for the first content type:
39+
Fill in the name `Tasks` for the first content type:
3940

40-
```sh
41+
```console
4142
-> Content type name (Allowed: _ a-z A-Z and whitespace) [Todo Task]: Tasks
4243
```
4344

44-
we keep the default base class `Container` here:
45+
We keep the default base class `Container` here:
4546

46-
```sh
47+
```console
4748
--> Dexterity base class (Container/Item) [Container]:
4849
```
4950

50-
we keep the default `globally addable`:
51+
We keep the default `globally addable`:
5152

52-
```sh
53+
```console
5354
--> Should the content type globally addable? [y]:
5455
```
5556

56-
we want to filter content types, which can be added to this container:
57+
We want to filter content types, which can be added to this container:
5758

58-
```sh
59+
```console
5960
--> Should we filter content types to be added to this container? [n]: y
6061
```
6162

62-
we keep the default behaviors active:
63+
We keep the default behaviors active:
6364

64-
```sh
65+
```console
6566
--> Activate default behaviors? [y]:
6667
```
6768

68-
now let's add a content type called `Task`:
69+
Now let's add a content type called `Task`:
6970

70-
```sh
71-
$ plonecli add content_type
71+
```shell
72+
plonecli add content_type
7273
```
7374

74-
fill in the name `Task` for the first content type:
75+
Fill in the name `Task` for the first content type:
7576

76-
```sh
77+
```console
7778
-> Content type name (Allowed: _ a-z A-Z and whitespace) [Todo Task]: Task
7879
```
7980

80-
we change the base class to `Item` here:
81+
We change the base class to `Item` here:
8182

82-
```sh
83+
```console
8384
--> Dexterity base class (Container/Item) [Container]: Item
8485
```
8586

86-
we don't want it to be globally addable `globally addable`:
87+
We don't want it to be globally addable `globally addable`:
8788

88-
```sh
89+
```console
8990
--> Should the content type globally addable? [y]: n
9091
```
9192

92-
if we disable globally addable, we will be ask a new question, for the parent content type, where we will answer `Tasks`:
93+
If we disable `globally addable`, the next question will ask for the parent content type, where we will answer `Tasks`:
9394

94-
```sh
95+
```console
9596
--> Parent container portal_type name: Tasks
9697
```
9798

98-
for the rest of the question we can keep the defaults.
99+
For the rest of the questions, we can keep the defaults.
99100

100-
To test our new Plone package and it's content types, we can use {term}`plonecli` to build a development environment and start Plone.
101+
To test our new Plone package and its content types, we can use {term}`plonecli` to build a development environment and start Plone.
101102

102-
```sh
103-
$ plonecli build
104-
$ plonecli serve
103+
```shell
104+
plonecli build
105+
plonecli serve
105106
```
106107

107-
Your Plone is now running on http://localhost:8080. You can add a new Plone site, enable your addon and add your content types.
108+
Your Plone is now running on http://localhost:8080.
109+
You can add a new Plone site, enable your add-on, and add your content types.
108110

109-
```{note}
110-
{term}`plonecli` takes care of all the details of a content type and it's configuration, for more configuration details see {ref}`backend-content-types-fti-label`.
111+
```{seealso}
112+
{term}`plonecli` takes care of all the details of a content type and its configuration.
113+
For more configuration details, see {doc}`fti`.
111114
```
112115

113-
For now your content type don't have any custom schema with fields defined.
116+
For now your content type doesn't have any custom schema with fields defined.
114117

115-
See {ref}`backend-schemas-label`, {ref}`backend-fields-label` and {ref}`backend-widgets-label` for information on how to add custom fields and widgets to your content type.
118+
See {doc}`/backend/schemas`, {doc}`/backend/fields` and {doc}`/backend/widgets` for information on how to add custom fields and widgets to your content type.
116119

117-
Also have a look at Plone {ref}`backend-behaviors-label`, which provide default features you can enable on per content type basis.
120+
Also have a look at Plone {doc}`/backend/behaviors`, which provide default features you can enable per content type.

0 commit comments

Comments
 (0)