File tree Expand file tree Collapse file tree 2 files changed +45
-1
lines changed
Expand file tree Collapse file tree 2 files changed +45
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ html_meta :
3+ " description " : " How to add a Control Panel"
4+ " property=og:description " : " How to add a Control Panel"
5+ " property=og:title " : " Control panels"
6+ " keywords " : " Plone, Add, Control Panel"
7+ ---
8+
9+ (backend-controlpanels-label)=
10+
11+ # Control panels
12+
13+ ## Adding a control panel
14+ To add a control panel to your add-on, you can use [ ` plonecli ` ] ( https://pypi.org/project/plonecli/ ) as follows:
15+
16+ ``` shell
17+ plonecli add controlpanel
18+ ```
19+
20+ This will create the control panel Python file in the control panel's folder where you can define your control panel schema fields.
21+
22+ ## Registering a Control panel
23+ To manually register a view as a control panel, add the following registration to your ` /profiles/default/controlpanel.xml ` .
24+
25+ ``` xml
26+ <?xml version =" 1.0" ?>
27+ <object
28+ name =" portal_control-panel"
29+ xmlns : i18n =" http://xml.zope.org/namespaces/i18n"
30+ i18n : domain =" lmu.behavior" >
31+ <configlet
32+ title =" Some Control Panel"
33+ action_id =" collective.example.some_control-panel"
34+ appId =" collective.example"
35+ category =" Products"
36+ condition_expr =" "
37+ url_expr =" string:${portal_url}/@@some_view"
38+ icon_expr =" "
39+ visible =" True"
40+ i18n : attributes =" title" >
41+ <permission >Manage portal</permission >
42+ </configlet >
43+ </object >
44+ ```
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ html_meta:
1212
1313``` {toctree}
1414:maxdepth: 2
15-
15+ control-panels
1616content-types
1717behaviors
1818annotations
You can’t perform that action at this time.
0 commit comments