Skip to content

Commit b54dc88

Browse files
jensensstevepiercy
andcommitted
Update docs/classic-ui/portlets.md
Co-authored-by: Steve Piercy <[email protected]>
1 parent 588fcf7 commit b54dc88

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

docs/classic-ui/portlets.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ myst:
1111

1212
# Portlets
1313

14-
## What is a Portlet?
1514

1615
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.
1716

@@ -30,10 +29,10 @@ As a user, you can add a portlet to a web page in a Plone site by following thes
3029

3130
1. Navigate to the web page where you want to add the portlet.
3231

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.
3433
This will open the "Manage portlets" screen.
3534

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.
3736
This will open an edit form, now fill in the form.
3837

3938
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
4948
## Writing a custom Portlet
5049

5150
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.
5352

5453
Here is an example of a very simple portlet class ``my_portlet.py``:
5554

@@ -149,7 +148,7 @@ The message is set when the portlet is added and can be edited in the portlet's
149148
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.
150149
Here is an example ``configure.zcml`` file that registers the MyPortlet class defined above:
151150

152-
```XML
151+
```xml
153152
<configure xmlns="http://namespaces.zope.org/zope"
154153
xmlns:browser="http://namespaces.zope.org/browser"
155154
xmlns:plone="http://namespaces.plone.org/plone"
@@ -178,8 +177,8 @@ This file registers a portlet with the following properties:
178177
- *Renderer:* "example.portlet.Renderer"
179178
- *Schema:* "example.portlet.IExamplePortlet"
180179

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.
182181

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.
184183

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

Comments
 (0)