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
+7-8Lines changed: 7 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,6 @@ myst:
11
11
12
12
# Portlets
13
13
14
-
## What is a Portlet?
15
14
16
15
In Plone, a portlet is a small, modular piece of content that can be displayed in a specific area of a web page. Portlets are typically used to display information that is relevant to the current context, such as the latest news, upcoming events, or a list of related documents.
17
16
@@ -30,10 +29,10 @@ As a user, you can add a portlet to a web page in a Plone site by following thes
30
29
31
30
1. Navigate to the web page where you want to add the portlet.
32
31
33
-
2. Click on the "Manage portlets" link in the toolbar of the page and select the region on the page to modify.
32
+
2. Click on the {guilabel}`Manage portlets` link in the toolbar of the page and select the region on the page to modify.
34
33
This will open the "Manage portlets" screen.
35
34
36
-
3. In the "Add portlets" menu, select the portlet that you want to add and click the "Add" button.
35
+
3. In the {menuselection}`Add portlets` menu, select the portlet that you want to add, and click the {guilabel}`Add` button.
37
36
This will open an edit form, now fill in the form.
38
37
39
38
4. Click the "Save" button to save your changes and add the portlet to the web page.
@@ -49,7 +48,7 @@ As a user, you can add a portlet to a web page in a Plone site by following thes
49
48
## Writing a custom Portlet
50
49
51
50
To create a portlet, you will need to write Python classes that define the portlet and its behavior.
52
-
This class should subclass the Portlet class from the `plone.portlets` package.
51
+
This class should subclass the `Portlet` class from the `plone.portlets` package.
53
52
54
53
Here is an example of a very simple portlet class ``my_portlet.py``:
55
54
@@ -149,7 +148,7 @@ The message is set when the portlet is added and can be edited in the portlet's
149
148
To register this portlet with Plone, you will need to create a ``configure.zcml`` file that tells Plone about the portlet, and - after a restart - you can add it to a Plone page using the "manage portlets" screen.
150
149
Here is an example ``configure.zcml`` file that registers the MyPortlet class defined above:
@@ -178,8 +177,8 @@ This file registers a portlet with the following properties:
178
177
-*Renderer:* "example.portlet.Renderer"
179
178
-*Schema:* "example.portlet.IExamplePortlet"
180
179
181
-
These values should match the corresponding classes and interfaces defined in the example code from the previous answer.
180
+
These values should match the corresponding classes and interfaces defined in the example code from the previous example.
182
181
183
-
This file registers the MyPortlet class as a portlet with Plone. It also specifies the portlet's name, title, description, and category.
182
+
This file registers the `MyPortlet` class as a portlet with Plone. It also specifies the portlet's name, title, description, and category.
184
183
185
-
To get more examples you can also look at the source code of the Plone core package (plone.app.portlets)[https://github.com/plone/plone.app.portlets], or of other Plone add-ons that include portlets for examples of how to write and register portlets.
184
+
For more examples of how to write and register portlets, look at the source code of the Plone core package [`plone.app.portlets`](https://github.com/plone/plone.app.portlets), or of other Plone add-ons that include portlets.
0 commit comments