Skip to content

Commit 358fefc

Browse files
committed
- Move tip outside DRY, and combine both the original and new options. Its target audience is first-timers.
- Create new subsection for installation of the add-on. - Sync tabs.
1 parent 72c0b9c commit 358fefc

1 file changed

Lines changed: 29 additions & 21 deletions

File tree

docs/admin-guide/add-ons.md

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ First, configure your project according to the instructions in the tabbed interf
2929
Select the tab according to the method you used to create your project.
3030

3131
`````{tab-set}
32-
3332
````{tab-item} Cookieplone
33+
:sync: cookieplone
3434
3535
Add the name of your add-on in the file {file}`backend/pyproject.toml` in the section `dependencies`.
3636
This example adds [`collective.easyform`](https://pypi.org/project/collective.easyform/).
@@ -46,24 +46,16 @@ dependencies = [
4646
]
4747
```
4848
49-
Also add the add-on to `zcml_package_includes` in the file {file}`backend/instance.yaml` to make sure its configuration will be loaded.
49+
To configure the add-on to load, in the file {file}`backend/instance.yaml`, under the key `default_context`, for the key `zcml_package_includes`, set its value to the add-on's name.
5050
5151
```yaml
5252
default_context:
5353
zcml_package_includes: project_title, collective.easyform
5454
```
55-
56-
Stop the backend with {kbd}`ctrl-c`.
57-
58-
To actually download and install the new add-on, run the following command.
59-
60-
```shell
61-
make backend-build
62-
```
63-
6455
````
6556
6657
````{tab-item} Buildout
58+
:sync: buildout
6759
6860
Update the file {file}`buildout.cfg`.
6961
This example uses [`collective.easyform`](https://pypi.org/project/collective.easyform/).
@@ -85,17 +77,9 @@ eggs =
8577
collective.easyform
8678
8779
[versions]
88-
collective.easyform = 4.2.1
80+
collective.easyform = 4.5.1
8981
```
90-
91-
To actually download and install the new add-on, run the following command.
92-
93-
```shell
94-
bin/buildout -N
95-
```
96-
9782
````
98-
9983
`````
10084

10185
```{tip}
@@ -105,7 +89,31 @@ You can control which version of an add-on to install through "version pinning."
10589
- Leave it off to always install the latest version.
10690
```
10791

108-
Now restart the backend.
92+
### Install the add-on
93+
94+
Stop the backend with {kbd}`ctrl-c`.
95+
96+
To actually download and install the new add-on, run the following command.
97+
98+
`````{tab-set}
99+
````{tab-item} Cookieplone
100+
:sync: cookieplone
101+
102+
```shell
103+
make backend-build
104+
```
105+
````
106+
107+
````{tab-item} Buildout
108+
:sync: buildout
109+
110+
```shell
111+
bin/buildout -N
112+
```
113+
````
114+
`````
115+
116+
Finally, restart the backend.
109117

110118
```{seealso}
111119
{doc}`run-plone`

0 commit comments

Comments
 (0)