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
This chapter describes how to create a control panel for your Plone add-on, whether accessed through either the Classic UI or Volto frontend.
15
+
16
+
It also covers advanced topics—including how to group fields in your control panel—and provides a schema field reference, troubleshooting tips, control panel file structure, and a Plone REST API compatibility reference.
17
+
18
+
19
+
## Creation approaches
20
+
14
21
There are two approaches to create a control panel for your Plone add-on:
15
22
16
23
-[`plonecli`](https://pypi.org/project/plonecli/)
@@ -140,22 +147,22 @@ Create a {file}`mypackage/profiles/default/controlpanel.xml` in your package's G
140
147
```
141
148
142
149
The category attribute can be one of the following values.
143
-
These values correspond to the groups in Site Setup.
150
+
These values correspond to the groups in {guilabel}`Site Setup`.
144
151
145
152
`plone-general`
146
-
: General settings
153
+
: {guilabel}`General`
147
154
148
155
`plone-content`
149
-
: Content-related settings
156
+
: {guilabel}`Content`
150
157
151
158
`plone-users`
152
-
: Users and groups settings
159
+
: {guilabel}`Users`
153
160
154
161
`plone-security`
155
-
: Security settings
162
+
: {guilabel}`Security`
156
163
157
164
`plone-advanced`
158
-
: Advanced settings
165
+
: {guilabel}`Advanced`
159
166
160
167
161
168
### Set default values in the registry
@@ -217,6 +224,8 @@ To manually register a view as a control panel, add the following registration t
217
224
</object>
218
225
```
219
226
227
+
Your control panel should now appear in {guilabel}`Site Setup`.
228
+
220
229
221
230
## Use `FieldSet` to group fields
222
231
@@ -296,10 +305,10 @@ You'll need to perform one or more of the following steps.
296
305
297
306
If your control panel doesn't appear or doesn't work as expected:
298
307
299
-
- Verify that all ZCML is properly registered
300
-
- Check for errors in the Plone error log
301
-
- Ensure your GenericSetup profiles are correctly installed
302
-
- Validate that the interface path in registry.xml matches your actual Python path
308
+
- Verify that all ZCML is properly registered.
309
+
- Check for errors in the Plone error log.
310
+
- Ensure your GenericSetup profiles are correctly installed.
311
+
- Validate that the interface path in {file}`registry.xml` matches your actual Python path.
303
312
304
313
305
314
## Example file structure
@@ -321,9 +330,9 @@ mypackage/
321
330
└── registry.xml
322
331
```
323
332
324
-
## REST API compatible control panels
333
+
## REST API compatibility
325
334
326
-
For better integration between backend and Volto, you can create REST API compatible control panels using the adapter pattern.
335
+
For better integration between Plone's backend and its frontend Volto, you can create REST API compatible control panels using the adapter pattern.
327
336
This approach is particularly useful when developing control panels that need to work seamlessly with Volto.
328
337
329
338
Create a Python module {file}`mypackage/controlpanel.py` as follows.
0 commit comments