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
+27-2Lines changed: 27 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ As a user, you can add a portlet to a web page in a Plone site by following thes
40
40
If you do not see the {guilabel}`Manage portlets` link, you may need to contact the site administrator to request access.
41
41
42
42
3. In the {menuselection}`Add portlets` menu, select the portlet type that you want to add, and click the {guilabel}`Add` button.
43
-
This will open a form to edit the settings for the selected portlet type.
43
+
This will open a form to edit the settings for the selected portlet type.
44
44
45
45
4. Click the {guilabel}`Save` button to save your changes and add the portlet to the web page.
46
46
This adds the portlet to the list of {guilabel}`Portlets assigned here` on the screen.
@@ -50,7 +50,6 @@ As a user, you can add a portlet to a web page in a Plone site by following thes
50
50
The {guilabel}`X` button deletes the portlet.
51
51
These options will only appear at the root from which the object inherits its settings.
52
52
53
-
54
53
## Writing a custom Portlet
55
54
56
55
To create a portlet, you will need to write Python classes that define the portlet and its behavior.
@@ -202,3 +201,29 @@ These values should match the corresponding classes and interfaces defined in th
202
201
This file registers the `MyPortlet` class as a portlet with Plone. It also specifies the portlet's name, title, description, and category.
203
202
204
203
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.
204
+
205
+
## Call one portlet by URL
206
+
207
+
To call a portlet by its URL, for example, to update it via an AJAX call, use the `@@render-portlet` view in your portlet renderer with `portlethash` as a query parameter.
208
+
209
+
The following example shows how to construct a reload URL for a portlet.
210
+
211
+
```python
212
+
from plone.app.portlets.portlets.base import Renderer
0 commit comments