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
Copy file name to clipboardExpand all lines: docs/classic-ui/portlets.md
+12-6Lines changed: 12 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,9 +18,11 @@ In Plone, a portlet is a small, modular piece of content that can be displayed i
18
18
The context is either the current part of the content hierarchy, the current user's group memberships, or the current content type.
19
19
Thus, if a portlet was set on a folder, all contained items do display the portlet unless it is explicitly blocked.
20
20
21
-
Portlets are highly customizable and can be used to display a wide variety of information. They can be added, removed, or rearranged on a web page by users with the appropriate permissions, allowing for a high degree of flexibility in the layout and content of a Plone site.
21
+
Portlets are highly customizable and can be used to display a wide variety of information.
22
+
They can be added, removed, or rearranged on a web page by users with the appropriate permissions, allowing for a high degree of flexibility in the layout and content of a Plone site.
22
23
23
-
Plone comes with a number of built-in portlets, such as the news portlet, the events portlet, and the login portlet. In addition, developers can create custom portlets to display specific types of information or to provide specific functionality.
24
+
Plone comes with several built-in portlets, such as the news portlet, the events portlet, and the login portlet.
25
+
In addition, developers can create custom portlets to display specific types of information or to provide specific functionality.
24
26
25
27
## Adding a portlet to a page
26
28
@@ -32,17 +34,21 @@ As a user, you can add a portlet to a web page in a Plone site by following thes
32
34
This will open the "Manage portlets" screen.
33
35
34
36
3. In the "Add portlets" menu, select the portlet that you want to add and click the "Add" button.
35
-
This will add the portlet to the list of "Portlets assigned here" on the screen.
37
+
This will open an edit form, now fill in the form.
36
38
37
39
4. Click the "Save" button to save your changes and add the portlet to the web page.
38
-
Note that you must have the appropriate permissions in order to add portlets to a web page. If you do not see the "Manage portlets" link, you may need to contact the site administrator to request access.
40
+
This adds the portlet to the list of "Portlets assigned here" on the screen.
41
+
Note that you must have the appropriate permissions to add portlets to a web page.
42
+
If you do not see the "Manage portlets" link, you may need to contact the site administrator to request access.
39
43
40
44
5. Use the "Up" and "Down" arrows in the "Assigned portlets" section to change the order in which the portlets will be displayed on the web page.
45
+
The "Hide" button will deactivate the portlet.
46
+
The "X" button deletes the portlet.
41
47
42
48
43
49
## Writing a custom Portlet
44
50
45
-
To create a portlet, you will need to write a Python class that defines the portlet and its behavior.
51
+
To create a portlet, you will need to write Python classes that define the portlet and its behavior.
46
52
This class should subclass the Portlet class from the `plone.portlets` package.
47
53
48
54
Here is an example of a very simple portlet class ``my_portlet.py``:
@@ -176,4 +182,4 @@ These values should match the corresponding classes and interfaces defined in th
176
182
177
183
This file registers the MyPortlet class as a portlet with Plone. It also specifies the portlet's name, title, description, and category.
178
184
179
-
To get more example you can also look at the source code of the Plone core package `plone.app.porlets`, or of other Plone add-ons that include portlets for examples of how to write and register portlets.
185
+
To get more examples you can also look at the source code of the Plone core package `plone.app.porlets`, or of other Plone add-ons that include portlets for examples of how to write and register portlets.
0 commit comments